diff options
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) |