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
<code/>and<pre/>for code samples.