module ActionView::Layouts::ClassMethods::LayoutConditions

def _conditional_layout?

* Boolean - True if the action has a layout definition, false otherwise.
==== Returns

set by the layout method.
checking the action name against the :only and :except conditions
Determines whether the current action has a layout definition by
def _conditional_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