diff options
author | Jeff Kreeftmeijer <jeff@kreeftmeijer.nl> | 2010-05-15 20:07:13 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-05-15 11:19:41 -0700 |
commit | da90fe94662b338a2430e99ff0d3298059a28a51 (patch) | |
tree | bd439dba55bd640c243bd9b9f19690ab6b62d244 /actionpack | |
parent | bc1c8d58ec45593acba614d1d0fecb49adef08ff (diff) | |
download | rails-da90fe94662b338a2430e99ff0d3298059a28a51.tar.gz rails-da90fe94662b338a2430e99ff0d3298059a28a51.tar.bz2 rails-da90fe94662b338a2430e99ff0d3298059a28a51.zip |
make sure `as` is set before trying to build an #{as}_counter. [#2804 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/render/partials.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 6160a95e20..5d266c46bf 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -248,7 +248,7 @@ module ActionView @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) |