instance method
each_element
Ruby on Rails 6.1.7.10
Since v4.0.13 Last seen in v7.2.3 PrivateSignature
each_element(object, &block)
No documentation comment.
Parameters
-
objectreq -
blockblock
Source
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 952
def each_element(object, &block)
case object
when Array
object.grep(Parameters).map { |el| yield el }.compact
when Parameters
if object.nested_attributes?
object.each_nested_attribute(&block)
else
yield object
end
end
end
Defined in actionpack/lib/action_controller/metal/strong_parameters.rb line 952
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Parameters