has_many

Sam Mayes
2005-09-05T00:54:31Z

Ok my system model has_many prices, and rails nicely lets me do this

<% for price in @systems[counter].prices %>

<a href="#"
class=content_storename1><%=
price.store_name %>
<a href="#"
class=content_price1>...<%= price.price %>

<% end %>

this does as expected and lists all the prices for a system, is there an
easy way to say only get the first 3 prices? Im a bit stumped
ive tried @systems[counter].prices[1] to get just the first one and no go.
Can anyone help? Thanks


Sam