diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-04-17 18:55:21 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-04-18 18:57:13 -0400 |
commit | 93034ad7fea7e00562103a7cd0acfab19bbfadf9 (patch) | |
tree | 9cba660f6dd0e0c26cf9de8ecf0a818c5a87970f /actionpack/lib/action_controller | |
parent | 70c6fb1a06d76d0d6cddb6fb50137aa1341745a0 (diff) | |
download | rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.tar.gz rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.tar.bz2 rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.zip |
Reuse the Parameters#to_h check in the routing helpers
Since this protection is now in Parameters we can use it instead of
reimplementing again.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index ce60026325..7864f9decd 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -49,7 +49,7 @@ module ActionController # params = ActionController::Parameters.new(a: "123", b: "456") # params.to_h # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - class UnfilteredParameters < StandardError + class UnfilteredParameters < ArgumentError def initialize # :nodoc: super("unable to convert unpermitted parameters to hash") end |