I have the following code in my layout file:
<% @families = ProductFamily.find(:all, :include => :products) %>
<% @families.each do |f| %>
    <h2><%=h f.name %></h2>
    <ul>
    <% f.products.each do |product| %>
        <li><%=h product.name %></li>
    <% end %>
    </ul>
<% end %>
Two things: I doubt this follows standard MVC procedures, so any help on making it so would be a huge plus. But most importantly, the product name is not being displayed. Instead, the model name (or so I assume) is being shown in its place (i.e. "Product"). I know it is looping through all of the products, because the right number of lines is being shown--just not the actual product name.
Any suggestions? Thanks in advanced.