aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-07-19 21:53:02 +0900
committerYehuda Katz <wycats@gmail.com>2009-07-19 21:53:02 +0900
commitbb530923bcd5c643f9bfca8e36cd3fa36365032d (patch)
treee5d821e7f13334a64a3936d0a484bbcd8667552f /actionpack/lib/action_view/render
parent1a2946a6d9b1dbcf3a4c77654693d73f9b11bde1 (diff)
downloadrails-bb530923bcd5c643f9bfca8e36cd3fa36365032d.tar.gz
rails-bb530923bcd5c643f9bfca8e36cd3fa36365032d.tar.bz2
rails-bb530923bcd5c643f9bfca8e36cd3fa36365032d.zip
Simplify required "ActionView compliant" API
Diffstat (limited to 'actionpack/lib/action_view/render')
-rw-r--r--actionpack/lib/action_view/render/partials.rb6
1 files changed, 2 insertions, 4 deletions
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