diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-01-21 17:34:55 -0500 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-01-21 17:34:55 -0500 |
commit | 6fcc3c47eb363d0d3753ee284de2fbc68df03194 (patch) | |
tree | 96d1e8f623748e6f542b85d5a95af2aecbe4ffc6 /actionpack/lib | |
parent | 77e1b0eb3a16581924e175a685da1d8cc2319644 (diff) | |
parent | 627f736cc0a1a7b32e67303b92b963d4b6d9e68c (diff) | |
download | rails-6fcc3c47eb363d0d3753ee284de2fbc68df03194.tar.gz rails-6fcc3c47eb363d0d3753ee284de2fbc68df03194.tar.bz2 rails-6fcc3c47eb363d0d3753ee284de2fbc68df03194.zip |
Merge pull request #23167 from maclover7/fix-21032
Fix `ActionController::Parameters#==` bug
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 6 |
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 |