In my project i have this combo box, and it works perfectly:
<%= collection_select @project, @project.clients.id, @project.clients, :id, :name %>
My simple and quick question is, how can i render this in a partial, I’m using this and it’s not working…
<%= render :partial => "clients", :collection => @project.clients, :locals => {:project => @project }%>
and the partial code is:
<%= collection_select :project, clients.id, clients, clients.id, clients.name %
Try this within your partial:
(When you refer to template instance variables that are passed in to the partial as locals, use the non-symbol form of the variable name.)