I'm trying to generate a form that uses has_many :through and multiple selects. I'm working directly with the join table controller and working with edge rails. I want to generate a list to populate the join table without doing one step over and over again. When items are successfully created they contain the wrong information (Only a single entry and 1 for both join id values. Here's the code:
<p><label for="connection_familytype">Applicable Units</label><br/>
<select name="connection[familytype_id]" id="connection_familytype_ids" multiple="multiple"> <option value="0">All</option> <%= option_groups_from_collection_for_select(Familytype.find(:all, :order => "name", :conditions => "parent_id IS NULL and name != 'all'"), "children.find(:all)", "name", "id", "name")%> <br/><br/></select> </p>
<%= collection_multiple_select( 'connection', 'producttest_id', Producttest.find(:all, :order => "name", :conditions => "parent_id > 0"), :id, :name ) %>