aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorWill Bryant <will.bryant@gmail.com>2011-10-15 22:38:28 +1300
committerWill Bryant <will.bryant@gmail.com>2012-02-18 23:41:07 +1300
commit185c3dbc6ab845edfc94e8d38ef5be11c417dd81 (patch)
tree627ba354ac149d5eec2ea29835c17398496c9a93 /actionpack/lib
parent2f689d462d8e94365724c5575b14ab997e11bb43 (diff)
downloadrails-185c3dbc6ab845edfc94e8d38ef5be11c417dd81.tar.gz
rails-185c3dbc6ab845edfc94e8d38ef5be11c417dd81.tar.bz2
rails-185c3dbc6ab845edfc94e8d38ef5be11c417dd81.zip
assigns(:foo) should not convert @foo's keys to strings if it happens to be a hash
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/testing/test_process.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_process.rb b/actionpack/lib/action_dispatch/testing/test_process.rb
index b08ff41950..3a6d081721 100644
--- a/actionpack/lib/action_dispatch/testing/test_process.rb
+++ b/actionpack/lib/action_dispatch/testing/test_process.rb
@@ -5,7 +5,8 @@ require 'active_support/core_ext/hash/indifferent_access'
module ActionDispatch
module TestProcess
def assigns(key = nil)
- assigns = @controller.view_assigns.with_indifferent_access
+ assigns = {}.with_indifferent_access
+ @controller.view_assigns.each {|k, v| assigns.regular_writer(k, v)}
key.nil? ? assigns : assigns[key]
end