aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-07-17 14:18:33 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-07-17 14:18:47 -0700
commit7779e63371d1248bce5f30ebbae43e13ee7abb6a (patch)
tree4a462d14ddc2a7a46c680ab51acd215c0642a577 /actionpack
parent4129196fd455b64f4e93060ccf6fdda27e9403f3 (diff)
downloadrails-7779e63371d1248bce5f30ebbae43e13ee7abb6a.tar.gz
rails-7779e63371d1248bce5f30ebbae43e13ee7abb6a.tar.bz2
rails-7779e63371d1248bce5f30ebbae43e13ee7abb6a.zip
remove useless conditional
Since we proved that `element` is always of type `Parameter`, we know that it will always respond to `permit`, so lets remove this conditional
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index 3a585ae29a..9aac94ceb0 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -666,7 +666,6 @@ module ActionController
# Declaration { user: :name } or { user: [:name, :age, { address: ... }] }.
params[key] = each_element(value) do |element|
if element.is_a?(Parameters)
- element = self.class.new(element) unless element.respond_to?(:permit)
element.permit(*Array.wrap(filter[key]))
end
end