Class/Module Index [+]

Quicksearch

AbstractController::Layouts::ClassMethods::LayoutConditions

This module is mixed in if layout conditions are provided. This means that if no layout conditions are used, this method is not used

Public Instance Methods

action_has_layout?() click to toggle source

Determines whether the current action has a layout by checking the action name against the :only and :except conditions set on the layout.

Returns

  • Boolean - True if the action has a layout, false otherwise.

# File lib/abstract_controller/layouts.rb, line 191
def action_has_layout?
  return unless super

  conditions = _layout_conditions

  if only = conditions[:only]
    only.include?(action_name)
  elsif except = conditions[:except]
    !except.include?(action_name)
  else
    true
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.