aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r--actionpack/lib/abstract_controller/layouts.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb
index 6ac3806149..2f9616124a 100644
--- a/actionpack/lib/abstract_controller/layouts.rb
+++ b/actionpack/lib/abstract_controller/layouts.rb
@@ -281,14 +281,9 @@ module AbstractController
super
if _include_layout?(options)
- layout = options.key?(:layout) ? options[:layout] : :default
+ layout = options.key?(:layout) ? options.delete(:layout) : :default
value = _layout_for_option(layout)
-
- # TODO Revisit this. Maybe we should pass a :layout_prefix?
- options[:layout] = ((!value || value =~ /\blayouts/) ? value : "layouts/#{value}")
-
- # TODO Revisit this. :layout with :partial from controllers are not the same as in views
- options[:layout] = view_context._find_layout(options[:layout]) if options.key?(:partial)
+ options[:layout] = (value =~ /\blayouts/ ? value : "layouts/#{value}") if value
end
end