Module AbstractController::Layouts::ClassMethods
In: lib/abstract_controller/layouts.rb

Methods

Included Modules

LayoutConditions

Classes and Modules

Module AbstractController::Layouts::ClassMethods::LayoutConditions

Public Instance methods

If no layout is supplied, look for a template named the return value of this method.

Returns

  • String - A template name

Takes the specified layout and creates a _layout method to be called by _default_layout

If there is no explicit layout specified: If a layout is found in the view paths with the controller‘s name, return that string. Otherwise, use the superclass’ layout (which might also be implied)

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, which will return
  the template name
false:There is no layout
true:raise an ArgumentError

Parameters

  • String, Symbol, false - The layout to use.

Options (conditions)

  • :only - A list of actions to apply this layout to.
  • :except - Apply this layout to all actions but this one.

[Validate]