instance method
select
Ruby on Rails edge
Since v5.0.7.2Signature
select(&block)
Returns a new ActionController::Parameters instance with only items that the block evaluates to true.
Parameters
-
blockblock
Source
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1005
def select(&block)
return to_enum(:select) unless block_given?
new_instance_with_inherited_permitted_status(@parameters.select(&block))
end
Defined in actionpack/lib/action_controller/metal/strong_parameters.rb line 1005
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Parameters