public Method

ClassMethods.layout(template_name, conditions = {}, auto = false)

If a layout is specified, all rendered actions will have their result rendered when the layout yields. This layout can itself depend on instance variables assigned during action performance and have access to them as any normal template would.

Source Code

# File action_controller/layout.rb, line 170
def layout(template_name, conditions = {}, auto = false)
  add_layout_conditions(conditions)
  write_inheritable_attribute "layout", template_name
  write_inheritable_attribute "auto_layout", auto
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.