aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index f315d93939..dea4657988 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -411,8 +411,6 @@ 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)
@@ -622,6 +620,10 @@ module ActionController
end
end
+ # Undefine `to_param` such that it gets caught in the `method_missing`
+ # deprecation cycle below.
+ undef_method :to_param
+
def method_missing(method_sym, *args, &block)
if @parameters.respond_to?(method_sym)
message = <<-DEPRECATE.squish