Item.find(:all, :group => "colname")
On 5/1/06, Bill Walton <bill.walton@charter.net>
wrote:>
> 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
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060501/dd746b63/attachment.html