I have this code sample which doesnt work properly.

    <% @advert_types.each do |at| %>

      <div id="advert_type_name">
        <b><%= at.name %></b>
      </div>

      <% @resort.adverts.cleared_for_release.each do |advert| %>
        <div id="name">
          <%= render :partial => 'adverts/small_advert_for_side_panel',
:locals => { :advert => advert } %>
        </div>
      <% end %>

    <% end %>


I'm trying to show my cleared adverts in groups (grouped by
advert_type).

This code gives me my groups but the advert is listed under all
categories!

How do I do it?
-- 
Posted via http://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