wardenik wrote in post #974738:
> <% @users.each do |u| -%>
>  <tr class="<%= cycle("odd", "even") %>">
>   <td><%= u.name %>,<%= u.member_status_id %></td>
>   <td><%= collection_select( u, :member_status_id, blah blah blah %>

Please, please, please get that collection_select data access out of the 
view.

If you have 100 users, how many times will you exec that code?

Retrieve your @member_statuses in the controller, once, and use that var 
in the view.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to