Rails 7

I'm so proud of this one, it should be premium content!
I've watched all the other youtube videos on this topic and I'm sure this approach is better and more versatile.
Also this video gives great insight into the thought process and debugging required to complete the feature.
Code deliverables:
1. Sort Lists
2. Sort tasks within List
3. Move tasks between Lists
4. Persist changes
This functinality was achived thanks to:
- gem RankedModel that stores the order of items in a list
- RequestJS that sends http requests from your javascript to your Rails controller
- SortableJS that provides the seamless sorting functionality
Episode source code: github.com/corsego/119-trello...
Based on this blogpost: blog.corsego.com/drag-and-dro...
0:00 Preview of what we will build, other solutions
1:15 Build the boilerplate app. List has many tasks.
7:25 Install SortableJS to sort List elements in the frontend
11:20 Install gem Ranked Model to track sort order of elements
20:00 Install RequestJS to make requests to Rails controller from StimulusJS
25:45 Updating Sort order works!
26:53 Sort Tasks within a List
32:50 Sort Tasks between Lists
40:05 CSS to stack lists horizontally like Trello
41:40 Final demo. Advanced sorting works!

Пікірлер: 33

  • @lsampson1974
    @lsampson1974Ай бұрын

    I know this video is a year old, but I want to thank you anyway. You saved me a lot of time and frustration.

  • @SupeRails

    @SupeRails

    Ай бұрын

    Hi! I’m glad you found this video useful☺️ I think it will be relevant for a few more years. Currently there is no better approach with rails/hotwire

  • @odinapprentice
    @odinapprentice22 күн бұрын

    I just found your page and gave this video a watch. You helped me so much, thank you!

  • @sarrickshiflett2355
    @sarrickshiflett235511 ай бұрын

    Thank you so much! immediately subbed after it worked. I've been looking for a way to implement drag and drop since all my tutorials are out of date. You're my savior! I can continue my study path because of you 🙏🙌

  • @SupeRails

    @SupeRails

    8 ай бұрын

    Glad to know that it helped you!

  • @swedishpotato2
    @swedishpotato23 ай бұрын

    Absolutely awesome video - you are a natural teacher. Huge thanks for this! Please keep them coming!

  • @rajamohsin9675
    @rajamohsin96759 ай бұрын

    Your videos are always helpful than others

  • @SupeRails

    @SupeRails

    8 ай бұрын

    Thanks for the kind words!

  • @jazilzaim
    @jazilzaim3 ай бұрын

    Amazing video! Thank you so much! Immediately subbed! :)

  • @SupeRails
    @SupeRails Жыл бұрын

    just made the repository public! check it out here: github.com/corsego/119-trello-drag-drop-save/commits/main

  • @mariners_platter
    @mariners_platter Жыл бұрын

    Always enjoy learning Rails from your videos! Thank you

  • @SupeRails

    @SupeRails

    Жыл бұрын

    My pleasure!

  • @mariners_platter

    @mariners_platter

    Жыл бұрын

    @@SupeRails I visited your Courses page today, and saw that your courses are Rails 6. Any chance you will post a Rails 7 course in the near future?

  • @Islam-qy9dc
    @Islam-qy9dc4 ай бұрын

    Thanks for taking the time to research and build this! Just subscribed!

  • @rajamohsin9675
    @rajamohsin96759 ай бұрын

    You are great Yaro...!!

  • @promiseuka
    @promiseuka Жыл бұрын

    Thanks for to this. I fully understand now.

  • @ganyizhong
    @ganyizhong Жыл бұрын

    Thanks for sharing this. Really appreciate it. 👍

  • @SupeRails

    @SupeRails

    8 ай бұрын

    My pleasure!

  • @TNGears
    @TNGears Жыл бұрын

    Thank you! I'm amazed how many videos you have. Like and sub!

  • @stpaquet
    @stpaquet Жыл бұрын

    I'm not sure about the ranked_model gem as the acts_as_sortable seems to be more up-to-date. Can you elaborate a bit more about this choice?

  • @yeinercarvajalquina7727
    @yeinercarvajalquina7727 Жыл бұрын

    Thank you so much, I love your videos!!!

  • @arturmenter1431
    @arturmenter1431 Жыл бұрын

    interesting to watch. thanks for sharing

  • @SupeRails

    @SupeRails

    Жыл бұрын

    Glad you enjoyed it

  • @remotronic
    @remotronic Жыл бұрын

    Very useful

  • @neerajkeriya
    @neerajkeriya Жыл бұрын

    Very informative 👏

  • @andrea090395
    @andrea090395 Жыл бұрын

    Thanks a lot ! Very useful !

  • @SupeRails

    @SupeRails

    Жыл бұрын

    Glad to hear that!

  • @amirzahran2394
    @amirzahran2394 Жыл бұрын

    Great work ❤❤

  • @SupeRails

    @SupeRails

    Жыл бұрын

    Thanks ✌️

  • @FabrizioAzzarri
    @FabrizioAzzarri Жыл бұрын

    Great!

  • @laxmipasi2059
    @laxmipasi2059 Жыл бұрын

    This video is very helpful for one of my ongoing project thank you for this video. I want to do 1 thing that is when you are dropping element so I have few restriction based on that I will check that you can drop there or not. So could you please provide how to cancel draggable item in sortableJs so that draggable item will automatically go back to previous position. Thank you. ( note: in jquery-ui sortable we can use $(".sub-tickets, .sub-card").sortable("cancel"); but don't know what should use in sortableJs )

  • @thomasconnolly8201
    @thomasconnolly82018 ай бұрын

    Please present wife for kiss.

  • @SupeRails

    @SupeRails

    8 ай бұрын

    what?