instance method
each_element
Ruby on Rails 7.0.10
Since v4.0.13 Last seen in v7.2.3 PrivateSignature
each_element(object, filter, &block)
No documentation comment.
Parameters
-
objectreq -
filterreq -
blockblock
Source
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 966
def each_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)
else
yield object
end
end
end
Defined in actionpack/lib/action_controller/metal/strong_parameters.rb line 966
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Parameters