aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-08 14:46:57 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-08 14:46:57 +0100
commitea68fe59c670dd5580f3aa34fdfa0eb89eb717d3 (patch)
tree2321ba1aa0e720af1de7c7a87b17fc5075cf07a6 /actionpack/lib/abstract_controller
parent0a85380966e47a38292242e6c3b259d77c738ab5 (diff)
downloadrails-ea68fe59c670dd5580f3aa34fdfa0eb89eb717d3.tar.gz
rails-ea68fe59c670dd5580f3aa34fdfa0eb89eb717d3.tar.bz2
rails-ea68fe59c670dd5580f3aa34fdfa0eb89eb717d3.zip
More refactoring on the views side of rendering.
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