aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/partials.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-27 12:24:14 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-27 12:24:14 +0000
commit3d2f0001ea157d9951bdf6a7f6221a9ab4a80517 (patch)
tree95b357ddf7db1838e8f3cf69c20e649dde05eb2e /actionpack/lib/action_view/partials.rb
parentd9033bbb28f4acce74dcd2a1c1c5536b7a1917da (diff)
downloadrails-3d2f0001ea157d9951bdf6a7f6221a9ab4a80517.tar.gz
rails-3d2f0001ea157d9951bdf6a7f6221a9ab4a80517.tar.bz2
rails-3d2f0001ea157d9951bdf6a7f6221a9ab4a80517.zip
Fixed bug when a partial render was passing a local with the same name as the partial
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/partials.rb')
-rw-r--r--actionpack/lib/action_view/partials.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb
index be9d40ca53..06dead1b23 100644
--- a/actionpack/lib/action_view/partials.rb
+++ b/actionpack/lib/action_view/partials.rb
@@ -52,7 +52,7 @@ module ActionView
local_assigns = extract_local_assigns(local_assigns, deprecated_local_assigns)
local_assigns = local_assigns ? local_assigns.clone : {}
add_counter_to_local_assigns!(partial_name, local_assigns)
- local_assigns[partial_name] = object
+ local_assigns[partial_name.intern] ||= object
render("#{path}/_#{partial_name}", local_assigns)
end