Re: has_many

Andrew Stone
2005-09-05T02:30:08Z

Sam,

I''m still learning rails, but I think this may help...

to get the first price:

Prices.find(:first, :conditions => ["system_id =
?",@systems[counter].id])

to get the first three

Prices.find(:first, :conditions => ["system_id =
?",@systems[counter].id],
:limit => 3)

Of course, this depends on your model/class name and table structure...

--
Andrew Stone