On May 26, 5:26 pm, Jason Fleetwood-Boldt <[email protected]> wrote: > Those are basically your two options... > > Based on just what you've told us, an if statement inside a layout to choose > which partial seems like the logical way to do it. > > Also note you can render using a variable > <%= render :partial => @what_to_render %> > > then you can se @what_to_render in your controller if you want. it kind of > all depends on where the "decisioning" logic comes from
This is unfortunate if that's how to solve it. What if 10 pages need to use this same sublayout... do I need to have an if condition that is 10 if/elsif's? That's not scalable :/ It would really be better to have a layout that is special to these 2 pages that I can execute manually and wrap the content that is on the page. That way the content for that page is in the view it belongs to - not in the partial with an if/switch statement. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

