Forum: Ruby on Rails finding unique values in a column

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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

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.