-
Notifications
You must be signed in to change notification settings - Fork 139
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
Nested forms #569
Comments
Is this an issue with the code itself, or a general question? For general questions Stackoverflow or Github Discussions (if one is setup for this repo) is better than Github. |
It's happening only when using active_interaction so it seems like a bug with AI, not a general question |
Yes, you are correct, that's what I observe too. I didn't get to the bottom of it, so I'm just always passing the second argument. |
Update. Specifically methods
I've started implementing You can see it here. |
Hello,
I'm trying to use ActiveInteraction with nested forms feature of rails. Here is my view:
For some reason, the debug line is not returning a nested
section
record butnil
. On the other hand, if i pass a second argument tofields_for
(collection) as, say,f.fields_for :sections, record.sections
, the debug line returnsActiveRecord::Relation
instance instead of the record.Changing this code to use a direct record instead of interaction objects fixes everything and debug starts returning actual record objects which means that there is something wrong about ActiveInteraction that yelds a collection to fields_for block instead of iterating through objects. Or i just did something wrong :)
Thanks in advance for any clues!
The text was updated successfully, but these errors were encountered: