Rails

Previously we created a table that we can search and sort using gem Ransack, and paginate using gem Pagy.
We also made results update without page refresh using Hotwire Turbo Frames.
Now let's go DEEPER and have search in the navbar and FILTERS in the sidebar.
To do this, we will have to have HTML form fields OUTSIDE of a form. This is an HTML and ERB challenge.
We will also cover
- form.select vs select vs select_tag
- radio_buttons
- collection_check_boxes
And this is what I call LAYERED DESIGN. PROGRESSIVE ENCHANCEMENTS. STEP BY STEP.
Episode source code: github.com/corsego/147-datata...
0:00 Final demo, Filters examples
2:40 Multiselect
4:26 Multiselect checkboxes
7:40 Sidebar
8:46 Form Fields outside Form?
11:30 IT'S AMAZING
11:54 Select in sidebar
12:54 Radio buttons in sidebar
17:20 Dive deeper: Form Select vs Select vs SelectTag

Пікірлер: 7

  • @Casanovajosh
    @Casanovajosh6 ай бұрын

    Great one!!

  • @gosseynx
    @gosseynx6 ай бұрын

    After your video I rewrited much of my admin pages much more efficiently. Many thanks Yaroslav !

  • @volodymyrshabaldas6349
    @volodymyrshabaldas63496 ай бұрын

    🔥🔥🔥

  • @rusasd1
    @rusasd16 ай бұрын

    Super useful and interesting, I started using Ransack thanks to your videos and it's saving me so much time :)

  • @wdlpl
    @wdlpl6 ай бұрын

    Thx for very usefull tutorials.

  • @ledockol
    @ledockol6 ай бұрын

    Great, Yaro! The material is becoming more and more complex. So it will be more useful! In fact, we have already approached the creation of Facets search filters. If you want to develop this topic even more, you can automatically request the number of matching items from the server after selecting the filter options. Display this data in a small window with an "Apply" button. Further adding or removing filters will cause the number of items to change dynamically. Glory to Ukraine!

  • @SupeRails

    @SupeRails

    6 ай бұрын

    this sounds like a next-step feature! nice