KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The docs: http://guides.rubyonrails.org/active_record_querying.html#selecting-specific-fields Clearly state that: query = Client.select(:name).distinct # => Returns unique names However, when I try that in my controller, I get the following error: undefined method `distinct' for #<ActiveRecord::Relation:0xb2f6f2cc> To be clear, I want the distinct names, like ['George', 'Brandon'], not the clients actual records. Is there something that I am missing?
Tags (comma-separated)
Save Edits
Cancel