diff options
author | claudiob <claudiob@gmail.com> | 2016-01-12 10:27:29 -0800 |
---|---|---|
committer | claudiob <claudiob@gmail.com> | 2016-01-12 10:27:29 -0800 |
commit | 22288603645c95751f64245fc89fc259a27ad94c (patch) | |
tree | f1e7d06c17de6e1702e2f28a94fcfd7e9e66f808 /actionpack/lib/action_controller | |
parent | f718e52bcce02bc137263ead3a9d9f5df1c42c37 (diff) | |
download | rails-22288603645c95751f64245fc89fc259a27ad94c.tar.gz rails-22288603645c95751f64245fc89fc259a27ad94c.tar.bz2 rails-22288603645c95751f64245fc89fc259a27ad94c.zip |
AC::Parameters#at_json: restore Rails 4.2’s value
Fixes #23026
See discussion at #23026
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index b0a943c768..5cbf4157a4 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -109,7 +109,8 @@ module ActionController cattr_accessor :permit_all_parameters, instance_accessor: false cattr_accessor :action_on_unpermitted_parameters, instance_accessor: false - delegate :keys, :key?, :has_key?, :empty?, :include?, :inspect, to: :@parameters + delegate :keys, :key?, :has_key?, :empty?, :include?, :inspect, + :as_json, to: :@parameters # By default, never raise an UnpermittedParameters exception if these # params are present. The default includes both 'controller' and 'action' |