lib/active_view/layouts.rb
# Determine the layout for a given name, taking into account the name type.
#
# ==== Parameters
# * <tt>name</tt> - The name of the template
Determine the layout for a given name, taking into account the name type.
Parameters
name - The name of the template
Determine the layout for a given name taking into account the name type . Parameters name - The name of the template
def _layout_for_option(name)
      case name
      when String     then _normalize_layout(name)
      when Proc       then name
      when true       then Proc.new { _default_layout(true)  }
      when :default   then Proc.new { _default_layout(false) }
      when false, nil then nil
      else
        raise ArgumentError,
          "String, Proc, :default, true, or false, expected for `layout'; you passed #{name.inspect}"
      end
    end
def _layout_for_option ( name ) case name when String then _normalize_layout ( name ) when Proc then name when true then Proc . new { _default_layout ( true ) } when :default then Proc . new { _default_layout ( false ) } when false , nil then nil else raise ArgumentError , "String, Proc, :default, true, or false, expected for `layout'; you passed #{name.inspect}" end end
Determine the layout for a given name, taking into account the name type.
Determine the layout for a given name taking into account the name type .
name
<not_specific>