instance method
each_array_element
Ruby on Rails 8.1.2
Since v8.0.4 PrivateAvailable in: v8.0.4 v8.1.2
Signature
each_array_element(object, filter, &block)
Called when an explicit array filter is encountered.
Parameters
-
objectreq -
filterreq -
blockblock
Source
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1261
def each_array_element(object, filter, &block)
case object
when Array
object.grep(Parameters).filter_map(&block)
when Parameters
if object.nested_attributes? && !specify_numeric_keys?(filter)
object.each_nested_attribute(&block)
end
end
end
Defined in actionpack/lib/action_controller/metal/strong_parameters.rb line 1261
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Parameters