Forum: Ruby on Rails finding unique values in a column

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bill W. (Guest)
on 2006-05-03 20:58
(Received via mailing list)
Is there a way in Rails to find all the unique values in a column?  I
was hoping to find something like Item.find(:unique => "colname") but
didn't.  Is there a way, short of writing _ugly_ raw SQL to do this in
Rails?

Thanks,
Bill
Paul B. (Guest)
on 2006-05-03 20:58
(Received via mailing list)
Item.find(:all, :group => "colname")
This topic is locked and can not be replied to.