Rails Collection_select names
- by Jack
Hi,
I am creating a Rails app and have added a form:
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :client_id %><br />
<%= collection_select(:project, :client_id, Client.all, :id, :contact_name, {:prompt => "Select a Client"}) %>
</div>
This currently displays the contact_name of the client. Is it possible to have it display a list of contact_names concatenated with the client_id? If so, how would I do this?
Cheers