instance method
_layout_for_option
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v4.0.13 PrivateSignature
_layout_for_option(name)
Determine the layout for a given name, taking into account the name type.
Parameters
-
name- The name of the template
Parameters
-
namereq
Source
# File actionpack/lib/abstract_controller/layouts.rb, line 317
def _layout_for_option(name)
case name
when String then name
when true then _default_layout(true)
when :default then _default_layout(false)
when false, nil then nil
else
raise ArgumentError,
"String, true, or false, expected for `layout'; you passed #{name.inspect}"
end
end
Defined in actionpack/lib/abstract_controller/layouts.rb line 317
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Layouts