Stimulus Nested Forms | Ruby on Rails 7 Tutorial

Sdílet
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

Komentáře • 17

  • @Deanin
    @Deanin  Před rokem +6

    I'm gonna go sleep now. I need to wake up early to do tomorrow's video 😭

  • @klnmn3722
    @klnmn3722 Před 12 hodinami

    Successfully replaced Cocoon, which had me gouging my eyes out adding the jQuery dependency, with this. Thanks very much for the help.

  • @SupeRails
    @SupeRails Před rokem +6

    Now we're talking! Much better than cocoon approach in 2023.

  • @ashokpoudel6314
    @ashokpoudel6314 Před měsícem

    Thank you so much!
    better than cocoon approach, for sure.

  • @juanmanuelguzmannava3527
    @juanmanuelguzmannava3527 Před měsícem +1

    Thanks for the video. New suscriptor

  • @ettorebernardi6319
    @ettorebernardi6319 Před rokem +1

    Your content helps me a lot, thanks for the video

  • @singaporean8205
    @singaporean8205 Před rokem

    Wow thank you this was what I needed!!

  • @azizdevfull
    @azizdevfull Před rokem +1

    Amazing : )

  • @rickbacker1
    @rickbacker1 Před 2 měsíci +1

    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

    • @Deanin
      @Deanin  Před 2 měsíci

      Yeah the nested form stuff gives me a headache too!

  • @siyammohammed5416
    @siyammohammed5416 Před 9 měsíci +1

    if I have 2 nested forms what will I do?

  • @thomasconnolly8201
    @thomasconnolly8201 Před 6 měsíci

    Thanks for this. I'm wondering if the tasks could be sorted via drag & drop?

  • @johanandre5338
    @johanandre5338 Před rokem +3

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

    • @KurtisMullins
      @KurtisMullins Před rokem +1

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

  • @andrewkancev6035
    @andrewkancev6035 Před rokem

    Dean, it's great. Can you tell me how to use tasks created before? i mean don't create new tasks

  • @fatassj
    @fatassj Před 5 měsíci +1

    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.

  • @aksharjamgaonkar9020
    @aksharjamgaonkar9020 Před 10 měsíci

    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.