mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Fixed bug when a partial render was passing a local with the same name as the partial
|
||||
|
||||
* Improved performance of test app req/sec with ~10% refactoring the render method #1823 [Stefan Kaes]
|
||||
|
||||
* Improved performance of test app req/sec with 5-30% through a series of Action Pack optimizations #1811 [Stefan Kaes]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -330,7 +330,7 @@ class NewRenderTest < Test::Unit::TestCase
|
||||
|
||||
def test_partial_with_locals
|
||||
get :partial_with_locals
|
||||
assert_equal "Hello: David", @response.body
|
||||
assert_equal "Hello: david", @response.body
|
||||
end
|
||||
|
||||
def test_partial_collection
|
||||
|
||||
Reference in New Issue
Block a user