hi, i''m newbie for rails.
i''d like to order the amount of customers after counting in the table.
example
manager#1 has/have 3 customer(s)
customers 1:a
customers 2:b
customers 3:c
manager#2 has/have 1 customer(s)
customers 1:d
i think i should code the order of customers per manager in view
<% for i in manager.customers.size %>
<p><strong>customer : <%= i %></strong></p>
<% end %>
but it does not work, i have the error.
this time i can display name and the amount of customers for each
manager but i can''t display the order of customers such as customer
no.1,no.2 and so on.
how do i correct that?
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---