layout possibilities in rails
October 17th, 2007 • Uncategorized
Layouts in rails can be accomplished in quite a few ways. Here are the most common:
layouts/application.html.erb#default for all controllerslayouts/my_controller.html.erb#layout for a controller with the same namelayout "my_layout"in controller # explicitly set layout in controllerlayout :decide_on_layout# with ‘decide_on_layout being a method returning a layout name as stringrender :layout => false# no layout at all-
render :partial => ‘my_partial’, :layout => ‘my_other_partial’# partials as layouts