Reputation: 1974
I have a collection:
<Vote id: nil, author_uid: 9326214>, <Vote id: nil, author_uid: 5643421>, <Vote id: nil, author_uid: 9753813>
How can I get an array of author_uid values?
Thanks!
Upvotes: 2
Views: 955
Reputation: 1426
Vote.all.pluck(:author_uid)
Ruby on Rails Guide - pluck
Upvotes: 6