diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-06-16 13:44:51 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-06-16 13:44:51 -0700 |
commit | dd58f4021da30af7f40ee139e7487b887cac44e9 (patch) | |
tree | 34cb015228013c437851a3a13d7059357e57db13 /actionpack/lib/action_controller/base/layouts.rb | |
parent | 01a4bc84b8787df74d54147a0cf564df75e87970 (diff) | |
download | rails-dd58f4021da30af7f40ee139e7487b887cac44e9.tar.gz rails-dd58f4021da30af7f40ee139e7487b887cac44e9.tar.bz2 rails-dd58f4021da30af7f40ee139e7487b887cac44e9.zip |
An exception is raised if a layout is missing only if the layout is missing for all mimes
Diffstat (limited to 'actionpack/lib/action_controller/base/layouts.rb')
-rw-r--r-- | actionpack/lib/action_controller/base/layouts.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base/layouts.rb b/actionpack/lib/action_controller/base/layouts.rb index ace4b148c9..5c55e9745e 100644 --- a/actionpack/lib/action_controller/base/layouts.rb +++ b/actionpack/lib/action_controller/base/layouts.rb @@ -176,7 +176,7 @@ module ActionController super return if (options.key?(:text) || options.key?(:inline) || options.key?(:partial)) && !options.key?(:layout) - layout = options.key?(:layout) ? options[:layout] : :none + layout = options.key?(:layout) ? options[:layout] : :default options[:_layout] = _layout_for_option(layout, options[:_template].details) end @@ -184,7 +184,7 @@ module ActionController case name when String then _layout_for_name(name, details) when true then _default_layout(details, true) - when :none then _default_layout(details, false) + when :default then _default_layout(details, false) when false, nil then nil else raise ArgumentError, |