Skip to content

Commit

Permalink
make sure as is set before trying to build an #{as}_counter. [#2804
Browse files Browse the repository at this point in the history
…state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
Jeff Kreeftmeijer authored and jeremy committed May 15, 2010
1 parent 22b020d commit 5d7ad7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/partials.rb
Expand Up @@ -218,7 +218,7 @@ def render_partial_collection(options = {}) #:nodoc:
ActionController::RecordIdentifier.partial_path(object, controller.class.controller_path)
template = _pick_partial_template(_partial_path)
local_assigns[template.counter_name] = index
local_assigns["#{as.to_s}_counter".to_sym] = local_assigns[template.counter_name]
local_assigns["#{as.to_s}_counter".to_sym] = local_assigns[template.counter_name] if as
result = template.render_partial(self, object, local_assigns.dup, as)
index += 1
result
Expand Down

0 comments on commit 5d7ad7b

Please sign in to comment.