Has_many :through two way multiple select

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:

Applicable Units


All
<%=
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”)%>


<%=
collection_multiple_select(
‘connection’, ‘producttest_id’, Producttest.find(:all, :order =>
“name”, :conditions => “parent_id > 0”), :id, :name
)
%>
######################################
and the dump:

undefined method `producttest_ids=’ for #<Connection id: nil,
familytype_id: 1, producttest_id: 1>

vendor/rails/activerecord/lib/active_record/base.rb:2028:in
method_missing' app/controllers/connection_controller.rb:30:increate’
-e:4:in `load’
-e:4

Request

Parameters:

{“commit”=>“Create”,
“connection”=>{“producttest_id”=>[“3”,
“13”,
“14”],
“familytype_id”=>[“10015”,
“7”,
“5”,
“9”]}}

######################################
I would like to see the following generated from the above

Join table:
3 10015
3 7
3 5
3 9
13 10015

14 5
14 9
######################################

Response

Headers:

{“cookie”=>[],
“Cache-Control”=>“no-cache”}
######################################