instance method
slice
Ruby on Rails 6.1.7.10
Since v4.0.13Signature
slice(*methods)
Returns a hash of the given methods with their names as keys and returned values as values.
Parameters
-
methodsrest
Source
# File activerecord/lib/active_record/core.rb, line 758
def slice(*methods)
methods.flatten.index_with { |method| public_send(method) }.with_indifferent_access
end
Defined in activerecord/lib/active_record/core.rb line 758
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core