diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-07 02:46:21 -0300 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-07 02:46:21 -0300 |
commit | b3e199f6981b2fbf062fe668ff93b7dc56e98a38 (patch) | |
tree | b683fcefb279ebff096ef23e4579e788f88565ea /actionpack/lib/action_view/render/partials.rb | |
parent | 8534c5bf193c6a234d55116d520a54a1b634a93e (diff) | |
download | rails-b3e199f6981b2fbf062fe668ff93b7dc56e98a38.tar.gz rails-b3e199f6981b2fbf062fe668ff93b7dc56e98a38.tar.bz2 rails-b3e199f6981b2fbf062fe668ff93b7dc56e98a38.zip |
Some more AV refactoring:
* remove no longer used _array_like_objects
* _render_content_with_layout renamed to _render_content since layout it optional
* remove check for optional layout before _render_content
Diffstat (limited to 'actionpack/lib/action_view/render/partials.rb')
-rw-r--r-- | actionpack/lib/action_view/render/partials.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 89d954037b..7a791d03ce 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -229,19 +229,10 @@ module ActionView def _render_partial_with_layout(layout, options) if layout - prefix = controller && !layout.include?("/") ? controller.controller_path : nil + prefix = layout.include?(?/) ? nil : controller_path layout = find_by_parts(layout, {:formats => formats}, prefix, true) end - content = _render_partial(options) - return _render_content_with_layout(content, layout, options[:locals]) - end - - def _array_like_objects - array_like = [Array] - if defined?(ActiveRecord) - array_like.push(ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope) - end - array_like + _render_content(_render_partial(options), layout, options[:locals]) end def _render_partial_object(template, options) |