aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/strong_parameters.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-01-21 17:28:18 -0500
committerJon Moss <me@jonathanmoss.me>2016-01-21 17:28:18 -0500
commit627f736cc0a1a7b32e67303b92b963d4b6d9e68c (patch)
treecea7ae0af777964f584cb4581f5c1013c9c19409 /actionpack/lib/action_controller/metal/strong_parameters.rb
parent06397336b2c9b1de9462f1baa8075573fd3709dd (diff)
downloadrails-627f736cc0a1a7b32e67303b92b963d4b6d9e68c.tar.gz
rails-627f736cc0a1a7b32e67303b92b963d4b6d9e68c.tar.bz2
rails-627f736cc0a1a7b32e67303b92b963d4b6d9e68c.zip
Fix `ActionController::Parameters#==` bug
See bug #21032.
Diffstat (limited to 'actionpack/lib/action_controller/metal/strong_parameters.rb')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index e9aa0aae37..ba03430930 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -160,7 +160,11 @@ module ActionController
if other_hash.respond_to?(:permitted?)
super
else
- @parameters == other_hash
+ if other_hash.is_a?(Hash)
+ @parameters == other_hash.with_indifferent_access
+ else
+ @parameters == other_hash
+ end
end
end