aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-08-31 21:26:46 +0200
committerGitHub <noreply@github.com>2016-08-31 21:26:46 +0200
commit2095d364bcbdce9dff885b1b832908212819dc3d (patch)
treefa780ea2d0f5ee48aff629a92c7da84675a6731c /actionpack/lib
parent8ab9daf2803504edbd49f9c97a7f2eb484f15747 (diff)
parentf1e86a051f5f170c3ab8153f7875269c3395d34b (diff)
downloadrails-2095d364bcbdce9dff885b1b832908212819dc3d.tar.gz
rails-2095d364bcbdce9dff885b1b832908212819dc3d.tar.bz2
rails-2095d364bcbdce9dff885b1b832908212819dc3d.zip
Merge pull request #26328 from kirs/strong-params-to-param
Do not allow to_param on AC::Parameters
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index d62e01d185..f315d93939 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -2,6 +2,7 @@ require "active_support/core_ext/hash/indifferent_access"
require "active_support/core_ext/hash/transform_values"
require "active_support/core_ext/array/wrap"
require "active_support/core_ext/string/filters"
+require "active_support/core_ext/object/to_query"
require "active_support/rescuable"
require "action_dispatch/http/upload"
require "rack/test"
@@ -410,6 +411,8 @@ module ActionController
convert_hashes_to_parameters(key, @parameters[key])
end
+ undef_method :to_param
+
# Assigns a value to a given +key+. The given key may still get filtered out
# when +permit+ is called.
def []=(key, value)