This video covers implementing Admin only Drag and Drop using Stimulus JS because I ran into one too many JQuery solutions. The gist below has the stimulus controller code!
Linktree Clone Course: https://learn.deanin.com/courses/buil...
Gist: https://gist.github.com/Deanout/dc08f...
Source: https://github.com/Deanout/blog_appli...
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
https://linktr.ee/deanin
Join this channel to get access to perks:
/ @deanin
If you liked this video, please consider subscribing: https://t.co/RZ4EwP0F2a
Timestamps
0:00 Drag And Drop In Rails 7
1:58 Adding The Acts_As_List Gem
2:11 Generate The Rails Drag Controller
2:24 Create The Rails Drag And Drop Stimulus Controller
3:01 Drag And Drop Rails Migration For Position
5:17 Setup The Frontend View For Admin Only Drag And Drop
11:54 Creating The Stimulus Drag And Drop Logic
13:34 Drag Start Method
16:39 Drop Method
24:31 Save To Database On Drag End Method
29:33 Update List Order In Database After Drag And Drop
31:53 Use Updated List Order To Render Items On Page
#Deanin #Software #Programming
Watch video Drag And Drop With Stimulus JS | Intro To Ruby On Rails 7 Part 22 online without registration, duration hours minute second in high quality. This video was added by user Deanin 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,249 once and liked it 85 people.