module ActionView::Layouts::ClassMethods
def layout(layout, conditions = {})
* :only - A list of actions to apply this layout to.
==== Options (conditions)
* layout - The layout to use.
==== Parameters
nil:: Force default layout behavior with inheritance
true:: raise an ArgumentError
false:: There is no layout
Symbol:: call the method specified by the symbol, which will return the template name
String:: the String is the template name
If the specified layout is a:
Specify the layout to use for this class.
def layout(layout, conditions = {}) include LayoutConditions unless conditions.empty? conditions.each {|k, v| conditions[k] = Array(v).map {|a| a.to_s} } self._layout_conditions = conditions self._layout = layout _write_layout_method end