instance method
values_at
Ruby on Rails 7.2.3
Since v6.1.7.10Signature
values_at(*methods)
Returns an array of the values returned by the given methods.
topic = Topic.new(title: "Budget", author_name: "Jason") topic.values_at(:title, :author_name) # => ["Budget", "Jason"]
Source
# File activerecord/lib/active_record/core.rb, line 594
Defined in activerecord/lib/active_record/core.rb line 594
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core