From bb530923bcd5c643f9bfca8e36cd3fa36365032d Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Sun, 19 Jul 2009 21:53:02 +0900 Subject: Simplify required "ActionView compliant" API --- actionpack/lib/action_view/render/partials.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/render') diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index a80ffe3c20..ccb14d513a 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -259,7 +259,7 @@ module ActionView _set_locals(object, locals, template, options) - self._partial = template + options[:_template] = template _render_template(template, locals) end @@ -278,7 +278,7 @@ module ActionView locals = (options[:locals] ||= {}) index, @_partial_path = 0, nil collection.map do |object| - template = passed_template || begin + options[:_template] = template = passed_template || begin _partial_path = ActionController::RecordIdentifier.partial_path(object, controller_path) template = _pick_partial_template(_partial_path) @@ -289,8 +289,6 @@ module ActionView index += 1 - self._partial = template - _render_template(template, locals) end.join(spacer) end -- cgit v1.2.3