From 50b9bde06c6350b2811efcf6636eef96c6ed9337 Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Sat, 15 May 2010 20:07:13 +0200 Subject: [PATCH] make sure `as` is set before trying to build an #{as}_counter. [#2804 state:resolved] --- actionpack/lib/action_view/partials.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index 02c4e9f..3aeebc6 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -218,7 +218,7 @@ module ActionView 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 -- 1.6.4.1