diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-08 11:32:01 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-08 11:32:01 +0100 |
commit | 0a85380966e47a38292242e6c3b259d77c738ab5 (patch) | |
tree | 60945065b107368e6cd2f06b63cf40d16f6e88ac /actionpack/lib/abstract_controller/layouts.rb | |
parent | 34b2180451f842b180dd925bab10e8f4afa34490 (diff) | |
download | rails-0a85380966e47a38292242e6c3b259d77c738ab5.tar.gz rails-0a85380966e47a38292242e6c3b259d77c738ab5.tar.bz2 rails-0a85380966e47a38292242e6c3b259d77c738ab5.zip |
Finally moved the find template logic to the views.
Diffstat (limited to 'actionpack/lib/abstract_controller/layouts.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/layouts.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 648a2da795..6ac3806149 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -264,7 +264,7 @@ module AbstractController self.class_eval <<-RUBY, __FILE__, __LINE__ + 1 def _layout - if template_exists?("#{_implied_layout_name}", :_prefix => #{_prefix.inspect}) + if template_exists?("#{_implied_layout_name}", #{_prefix.inspect}) "#{_implied_layout_name}" else super @@ -277,7 +277,9 @@ module AbstractController end end - def render_to_body(options) + def _normalize_options(options) + super + if _include_layout?(options) layout = options.key?(:layout) ? options[:layout] : :default value = _layout_for_option(layout) @@ -288,7 +290,6 @@ module AbstractController # 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) end - super end private |