aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/strong_parameters.rb
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2017-06-29 20:25:54 +0300
committerKir Shatrov <shatrov@me.com>2017-06-30 17:29:13 +0300
commitda895edf2e43d8c03089df7042a5bff7ef15fff0 (patch)
treedc0e043678882fb41299c9dd1427fa31fed9e9ab /actionpack/lib/action_controller/metal/strong_parameters.rb
parent5fe2a4f929fff7fa725545c47ac0f9372d8c643d (diff)
downloadrails-da895edf2e43d8c03089df7042a5bff7ef15fff0.tar.gz
rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.tar.bz2
rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.zip
Fallback Parameters#to_s to Hash#to_s
Fixes https://github.com/rails/rails/issues/29617
Diffstat (limited to 'actionpack/lib/action_controller/metal/strong_parameters.rb')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index cd6a0c0b98..3c16bde09c 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -180,6 +180,13 @@ module ActionController
# Returns a new array of the keys of the parameters.
##
+ # :method: to_s
+ #
+ # :call-seq:
+ # to_s()
+ # Returns the content of the parameters as a string.
+
+ ##
# :method: value?
#
# :call-seq:
@@ -195,7 +202,7 @@ module ActionController
#
# Returns a new array of the values of the parameters.
delegate :keys, :key?, :has_key?, :values, :has_value?, :value?, :empty?, :include?,
- :as_json, to: :@parameters
+ :as_json, :to_s, to: :@parameters
# By default, never raise an UnpermittedParameters exception if these
# params are present. The default includes both 'controller' and 'action'