In my Rails 3 application, I've got current_account.users.
What I want is a list of the names of all the users i.e. user.full_name. What's the most elegant way to do it?
If full_name is a column on the model, you can use the pluck method. That would look like current_account.users.pluck(:full_name). If not, you can use map or collect (same thing), which would look like current_account.users.map(&:full_name) or current_account.users.collect(&:full_name).
collect and map are the same thing. The reason I mentioned pluck first was exactly because of that performance enhancement.