Permalink
Browse files

Unneeded &block parameters

  • Loading branch information...
amatsuda committed Jan 11, 2016
1 parent 83215b8 commit dbf67b3a6f549769c5f581b70bc0c0d880d5d5d1
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -419,7 +419,7 @@ def []=(key, value)
# 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 @@ def transform_keys!(&block)
# 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

0 comments on commit dbf67b3

Please sign in to comment.