On Oct 13, 7:20 pm, Paul Young <[EMAIL PROTECTED]>
wrote:
> Removed the @ sign from :brand_id => @brand.id:
>
> <% for item in Item.find(:all, :conditions => {:brand_id => brand.id})
> %>
>   <%= item.name %>
> <% end %>
>
> Which appears to have fixed things

While this works, things will be a lot more concise and less error
prone if you use the associations, for example the above simplifies to

<% for item in brand.items %>
   <%= item.name %>
<% end %>

> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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