File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
actionpack/lib/action_controller/metal Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -578,7 +578,7 @@ def each_element(object)
578
578
end
579
579
580
580
def fields_for_style? ( object )
581
- ( object . is_a? ( Hash ) || object . is_a? ( Parameters ) ) &&
581
+ object . is_a? ( Parameters ) &&
582
582
object . to_unsafe_h . all? { |k , v | k =~ /\A -?\d +\z / && v . is_a? ( Hash ) }
583
583
end
584
584
@@ -665,7 +665,7 @@ def hash_filter(params, filter)
665
665
else
666
666
# Declaration { user: :name } or { user: [:name, :age, { address: ... }] }.
667
667
params [ key ] = each_element ( value ) do |element |
668
- if element . is_a? ( Hash ) || element . is_a? ( Parameters )
668
+ if element . is_a? ( Parameters )
669
669
element = self . class . new ( element ) unless element . respond_to? ( :permit )
670
670
element . permit ( *Array . wrap ( filter [ key ] ) )
671
671
end
You can’t perform that action at this time.
0 commit comments