diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-01-12 05:12:31 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-01-12 05:15:56 +0900 |
commit | dbf67b3a6f549769c5f581b70bc0c0d880d5d5d1 (patch) | |
tree | 7dbb24fde51703dca94b2ce535954440fe651fce | |
parent | 83215b86fe46d2974c472436dc3337581d17829c (diff) | |
download | rails-dbf67b3a6f549769c5f581b70bc0c0d880d5d5d1.tar.gz rails-dbf67b3a6f549769c5f581b70bc0c0d880d5d5d1.tar.bz2 rails-dbf67b3a6f549769c5f581b70bc0c0d880d5d5d1.zip |
Unneeded &block parameters
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 4cd67a85cc..b0a943c768 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -419,7 +419,7 @@ module ActionController # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none # params.fetch(:none, 'Francesco') # => "Francesco" # params.fetch(:none) { 'Francesco' } # => "Francesco" - def fetch(key, *args, &block) + def fetch(key, *args) convert_value_to_parameters( @parameters.fetch(key) { if block_given? @@ -514,7 +514,7 @@ module ActionController # to key. If the key is not found, returns the default value. If the # optional code block is given and the key is not found, pass in the key # and return the result of block. - def delete(key, &block) + def delete(key) convert_value_to_parameters(@parameters.delete(key)) end |