Ask A Question


You’re not receiving notifications from this thread.

Dynamic Nested Forms With Turbo Part 2 Discussion

Great lesson: thanks Collin! I learned a couple of new tricks there - appreciated!


Hey Terry! Thanks so much for the kind words and I’m super glad to hear that you enjoyed it and got some new tricks out of it!


For some reason, I lost the ability to update after adding the helper at the end. Anyone else?

Unpermitted parameters: :task_12, :task_13. Context: { controller: ProjectsController, action: update, request: #<ActionDispatch::Request:0x000000010f9478b0>, params: {"_method"=>"patch", "authenticity_token"=>"[FILTERED]", "project"=>{"name"=>"something", "tasks_attributes"=>{"task_12"=>{"description"=>"text"}, "task_13"=>{"description"=>"text",}}}, "button"=>"", "controller"=>"projects", "action"=>"update", "id"=>"2"} }

Hmmm, I not sure but let me look into that for you and report back!


Well, looked into it further. Def a bug. Rails doesn't like when you try to send that stuff through with the keys for the tasks as dom_id's which is a bummer. I got a fix you can see here
I'm gonna look into this more when a have some free time to see what else can be done here bc I feel like there's a better option. Sorry about that but thanks for bringing it up, Willard!


Thanks for the videos! One thought on the beginning part where you change the form to use task.hash. Why not just use that for all the tasks? If you include the ID as a hidden field, which I think you do in your code, I think Rails looks for the ID in the params hash anyways when updating existing records, right?

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,603+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.