Stimulus Nested Forms | Ruby on Rails 7 Tutorial
Vložit
- čas přidán 8. 03. 2023
- Today we take a look at a Stimulus implementation for nested forms in Ruby on Rails 7. It's a bit of a follow-up to the cocoon video we did the other day.
Checkout my course(s) at: learn.deanin.com
Source:
github.com/Deanout/stimulus_n...
Links:
www.stimulus-components.com/d...
developer.mozilla.org/en-US/d...
github.com/sponsors/stimulus-...
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
linktr.ee/deanin
If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
#Deanin #Software #Programming
I'm gonna go sleep now. I need to wake up early to do tomorrow's video 😭
Successfully replaced Cocoon, which had me gouging my eyes out adding the jQuery dependency, with this. Thanks very much for the help.
Now we're talking! Much better than cocoon approach in 2023.
Thank you so much!
better than cocoon approach, for sure.
Thanks for the video. New suscriptor
Your content helps me a lot, thanks for the video
Wow thank you this was what I needed!!
Amazing : )
Thank you very much for the video!
I had a task with nested form in the nested form and I used this stimulus controller - not the easiest task, trully saids.. nested form in nested form can be had ache
Yeah the nested form stuff gives me a headache too!
if I have 2 nested forms what will I do?
Thanks for this. I'm wondering if the tasks could be sorted via drag & drop?
Nice! I would even go one step further by not using accepts_nested_attributes_for and using turbo-frames. Then you probably could ditch the stimulus controller (or at least simplify it).
@johanandre5338 If you have a little "for dummies" video, guide, or gist on how to do that, I'd be interested! There's a lot to digest coming into Rails 7 with a lot of habits and muscle memory from working with other languages and libraries/frameworks.
Dean, it's great. Can you tell me how to use tasks created before? i mean don't create new tasks
I already had a nested form thing somewhat working, being able to add dynamic rows with Stimulus JS, however, my delete wasn't working yet.
So I watched this video, replaced everything instead with your logic, but none of the buttons worked for some reason.
HI thanks for the video. I am seeing an error ERROR in ./node_modules/stimulus-rails-nested-form/dist/stimulus-rails-nested-form.mjs 2:16-17
Can't import the named export 'Controller' from non EcmaScript module (only default export is available). any help here would be great, thanks.