[Rails] Searching a database

Zack Chandler
Sat, 05 Aug 2006 15:46:57 -0000

What class is this list you are refering to?  If it is a result set
from a ActiveRecord find call try this:

jobs = Job.find :all
big_jobs = jobs.find{|job| job.total_sale > 100000 }

Hope this helps,
Zack

On 8/5/06, N/a N/a <cain_152@yahoo.com> wrote:
> If I have a list of items, how can I search some item in the list, by
> some criteria or something else?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>