ex_admin icon indicating copy to clipboard operation
ex_admin copied to clipboard

fixes #89 #91 added ability for has_many forms to insert collection w…

Open dgross881 opened this issue 7 years ago • 2 comments

This fixes the issue of not being able to add tuples or queries to has_many collection opt. Some test's still needed to be written for has_many collection queries but test for has_many collection tuples have been added.

dgross881 avatar May 10 '17 08:05 dgross881

Just started looking at this myself, would it be possible to raise a PR for the phx-1.3 branch too?

chrisjowen avatar May 20 '17 08:05 chrisjowen

I believe that the name is not set correctly for the select field. No matter how many has_many items I add the field name is always parent[collection_id].

For example I have a Boat model which has_many BoatExtra which belongs_to Extra. What I am seeing is the form name is always boat[extra_id] hence the wrong params are sent to the controller. If I add a simple text form for a filed foo the name is boat[boat_extras_attributes][xxxx][foo].

chrisjowen avatar May 20 '17 08:05 chrisjowen