method
each_element
v7.1.3.2 -
Show latest stable
- Class:
ActionController::Parameters
each_element(object, filter, &block)private
No documentation available.
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1044
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