Hey Campers,
Here''s a little technique you can use to support multiple layouts
within a
Camping app.
def layout
@layout ||= ''default''
send("#{@layout}_layout") { yield }
end
The minimum you have to do after this is define a *default_layout*, but (as
you can hopefully see) you may define any number of arbitrary layouts to
wrap your content in.
Just set *@layout* in your controllers, and when it comes time to render a
view, be sure a layout w/ the name "#{@layout}_layout" exists.
--beppu
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/camping-list/attachments/20080526/419861f2/attachment.html>