instance method _layout_for_option

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v4.0.13 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13

Signature

_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

name req
Source
# File actionpack/lib/abstract_controller/layouts.rb, line 378
    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, true, or false, expected for `layout'; you passed #{name.inspect}"
      end
    end

Defined in actionpack/lib/abstract_controller/layouts.rb line 378 · View on GitHub · Improve this page · Find usages on GitHub

Defined in AbstractController::Layouts

Type at least 2 characters to search.

↑↓ navigate · open · esc close