On Wed, Apr 14, 2010 at 11:14 PM, joe mejoe <[email protected]> wrote:
> In addition to my question above, I'd also like to apply the equivalent
> of a 'where' clause without forcing another SQL query, in order to get

# modify this as needed
results = Issue.find(...)

statuses = results.collect(&:status).uniq.sort

open_issues = results.collect { |i| i.status == 'open' }

I suggest you read up on the Array class and its methods
collect, uniq and sort which I used here.

Have fun.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to