diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 986d3af454576..440836bfb13fb 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -232,8 +232,8 @@ def render_collection(passed_template = nil, &block) index = 0 - collection.map do |@object| - @path = partial_path + collection.map do |object| + @object, @path = object, partial_path template = passed_template || find @locals[template.counter_name] = index index += 1