Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dgross881
Copy link

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.

… insert collection with tuples and queries
@chrisjowen
Copy link

chrisjowen commented May 20, 2017

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

@chrisjowen
Copy link

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].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants