In the _form for creating a new Contact, I want to be able to create a drop-down which allows the User to select the Campaign the Contact will belong to.
In the controller, I created a collection called @campaigns.
And I tried to use the following but not getting it to work:
<p>
<%= f.label :campaign_id %><br />
<%= f.collection_select(:contact, :campaign_id, @campaigns, :id, :name) %>
</p>
Basically, I want to display the available :name of the campaigns, and then submit the campaign_id associated with the selected campaign to the Contact model when it gets saved.