instance method
values_at
Ruby on Rails 7.2.3
Since v7.1.6Signature
values_at(*methods)
Returns an array of the values returned by the given methods.
person = Person.new(id: 1, name: "bob") person.values_at(:id, :name) # => [1, "bob"]
Source
# File activemodel/lib/active_model/model.rb, line 63
Defined in activemodel/lib/active_model/model.rb line 63
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Model