method

layout

Importance_2
v5.2.3 - Show latest stable - 0 notes - Class: ClassMethods
layout(layout, conditions = {}) public

Specify the layout to use for this class.

If the specified layout is a:

String

the String is the template name

Symbol

call the method specified by the symbol

Proc

call the passed Proc

false

There is no layout

true

raise an ArgumentError

nil

Force default layout behavior with inheritance

Return value of Proc and Symbol arguments should be String, false, true or nil with the same meaning as described above.

Parameters

Options (conditions)

  • :only - A list of actions to apply this layout to.

  • :except - Apply this layout to all actions but this one.

Show source
Register or log in to add new notes.