Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make sure `as` is set before trying to build an #{as}_counter. [#2804

…state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit da90fe94662b338a2430e99ff0d3298059a28a51 1 parent bc1c8d5
@jeffkreeftmeijer jeffkreeftmeijer authored jeremy committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/render/partials.rb
View
2  actionpack/lib/action_view/render/partials.rb
@@ -248,7 +248,7 @@ def collection_with_template(template = @template)
@collection.each do |object|
locals[counter_name] += 1
- locals["#{as.to_s}_counter".to_sym] = locals[counter_name]
+ locals["#{as.to_s}_counter".to_sym] = locals[counter_name] if as
locals[as] = object
segments << template.render(@view, locals)
Please sign in to comment.
Something went wrong with that request. Please try again.