diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-12 20:39:53 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-12 20:39:53 +0100 |
commit | f2c0a353aef41a6df2de8e1fe3eaa3d8bbd8a6dd (patch) | |
tree | a854e0b7b79968f7f7cdfb57d29fd6644805c5ae /actionpack/lib/action_view/render/layouts.rb | |
parent | 2a12686832fbcf0566454904a5d733998506bf56 (diff) | |
download | rails-f2c0a353aef41a6df2de8e1fe3eaa3d8bbd8a6dd.tar.gz rails-f2c0a353aef41a6df2de8e1fe3eaa3d8bbd8a6dd.tar.bz2 rails-f2c0a353aef41a6df2de8e1fe3eaa3d8bbd8a6dd.zip |
Finish cleaning up rendering stack from views and move assigns evaluation to controller (so plugins and/or controllers can overwrite just one method).
Diffstat (limited to 'actionpack/lib/action_view/render/layouts.rb')
-rw-r--r-- | actionpack/lib/action_view/render/layouts.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/render/layouts.rb b/actionpack/lib/action_view/render/layouts.rb index 91a92a833a..0cb688ca77 100644 --- a/actionpack/lib/action_view/render/layouts.rb +++ b/actionpack/lib/action_view/render/layouts.rb @@ -1,8 +1,5 @@ -require 'active_support/core_ext/object/try' - module ActionView module Layouts - # You can think of a layout as a method that is called with a block. _layout_for # returns the contents that are yielded to the layout. If the user calls yield # :some_name, the block, by default, returns content_for(:some_name). If the user @@ -46,7 +43,7 @@ module ActionView # This is the method which actually finds the layout using details in the lookup # context object. If no layout is found, it checkes if at least a layout with # the given name exists across all details before raising the error. - def _find_layout(layout) #:nodoc: + def find_layout(layout) #:nodoc: begin layout =~ /^\// ? with_fallbacks { find_template(layout) } : find_template(layout) |