User.find([1,2,3])
I want to get name only in User model. I don't want to loop in an object so I tried:
name
User.find([1,2,3]).pluck(:name)
But no luck. How can I do the following scenario using pluck behavior?
pluck
Aucun commentaire:
Enregistrer un commentaire