[LRUG] Rails Question : Matching Share Nested Resources to Controllers
Anthony Green
Anthony.Green at bbc.co.uk
Mon Nov 5 06:12:32 PST 2007
What approach would you take here ?
Contextual checking in the views ?
or partial names based on parent resource instance variable name ?
Or some other way ?
On 5/11/07 13:49, "Tom Stuart" <tom at experthuman.com> wrote:
> If the views are heavily contextual then clearly they'll need to be
> separated out anyway, but that doesn't mean that the controllers need
> to be. Just put the contextual bits of the view in partials and render
> them as appropriate. It is tempting to relegate the view-selection
> problem to Rails by having separate controllers and letting it
> automatically render the default view for each, but I don't think
> that's a net win given the cost and how simple it is to do it yourself.
More information about the Chat
mailing list