Ruby on Rails #99 Hotwire: Search and Infinite Pagination (Ransack with Pagy)

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 34

  • @dc366
    @dc366 Год назад +2

    No need to do "params[:q]&.to_unsafe_h" as shown at 15:00. Just create a new variable in the controller @query = search_params[:q]. In the view just use q: @query.

    • @SupeRails
      @SupeRails  Год назад

      sounds legit, worth a try!

  • @mikopiko
    @mikopiko Год назад +4

    Your channel is such a goldmine, I love it

  • @Javail44
    @Javail44 Год назад +2

    Thanks Yaroslav ! 🙏

    • @SupeRails
      @SupeRails  Год назад

      Glad you found it useful, Lucas! What other topics would you find interesting?

  • @kristianpapadakis996
    @kristianpapadakis996 Год назад +1

    Thank you so much for this!

  • @joaofelipebarrosneto8719
    @joaofelipebarrosneto8719 5 месяцев назад +1

    Amazing tutorial. Tks

  • @paketankampus1663
    @paketankampus1663 Год назад +6

    I LOVE YOU MORE THAN MY EX
    NEXT: FILE UPLOAD WITH UPPY, TURBO STIMULUS, RAILS

    • @ddd2283
      @ddd2283 Год назад +1

      Im onboard with you!

    • @SupeRails
      @SupeRails  Год назад

      FILE UPLOAD WITH UPPY - thanks for the suggestion, I will check it out!

  • @rahulk6130
    @rahulk6130 Год назад +1

    loved this. thanks.

  • @Stifl
    @Stifl Год назад +1

    Very great video! I wouldn't have used ransack if I didn't find your video. You showed the exact features I wanted for my project 😄
    I'm just confused (and I'm definitely not a developer yet, I'm using this ransack and pagy in my training project), but why does the whole stuff have to be in the turbo_stream file? Is it just to make it more readable? I was able to cut the line count in half and make it display smother (load times cut in half I would say) by just integrating the turbo frame directly into the page with the list, instead of "loading the stream file" (or whatever it is called). (Your approach also didn't work straight out of the box, hence why I tried to simplify it and made it work in my project at the end)

    • @SupeRails
      @SupeRails  Год назад

      Hello Stifl! I've tried many different variations, and this is just what ticked all the boxes (infinite pagination, search params are taken into account)

  • @azizdevfull
    @azizdevfull Год назад +3

    very useful : )

  • @neerajkeriya
    @neerajkeriya Год назад +1

    Where is your cowboy hat?? 😄... BTW very usefull video.🙌

    • @SupeRails
      @SupeRails  Год назад

      haha just for you I will do another episode in the hat 🤠

  • @abdu5822
    @abdu5822 Год назад +1

    please tutorials about graphql in rails, model associations, deep dive into background and scheduled jobs with sidekiq.

    • @SupeRails
      @SupeRails  Год назад

      I will be definitely doing videos about "background and scheduled jobs with sidekiq" in the very near future. Stay tuned!
      Although can't promise GraphQL

  • @andyhemphill
    @andyhemphill Год назад +1

    How come you didnt have to update your rb with ransackable_attributes

    • @SupeRails
      @SupeRails  Год назад +1

      maybe I was using an older version of Ransack. I just recorded E148, and here I did have to add ransckable_attributes

  • @cintrarafael
    @cintrarafael Год назад +1

    Hi there, I'm use the version 4.0 of Ransack and you must defined ransackable_attributes. I'ts true!?

    • @SupeRails
      @SupeRails  Год назад +1

      Hey Rafael! I haven't actually used ransackable_attributes before. Interesting activerecord-hackery.github.io/ransack/going-further/other-notes/#authorization-allowlistingdenylisting

    • @SupeRails
      @SupeRails  Год назад

      maybe I was using an older version of Ransack. I just recorded E148, and here I did have to add ransckable_attributes

  • @Elgnonvis
    @Elgnonvis Год назад +1

    Thanks for this tuto
    Please how to searc through multiple model using one form??

    • @SupeRails
      @SupeRails  Год назад +1

      Good question! Actually, this is what I am doing on superails.com in the search bar (you can search posts, tags, playlists).
      I will put a screencast on this topic into my PRIORITY TODO list. Stay tuned!

    • @Elgnonvis
      @Elgnonvis Год назад

      @@SupeRails
      It will be king of you

  • @remotronic
    @remotronic Год назад +1

    👍

  • @VirtualHealthCare
    @VirtualHealthCare Год назад

    Make a video on signature pad

    • @SupeRails
      @SupeRails  Год назад

      you mean this one? github.com/szimek/signature_pad
      haven't heard of it before, looks like a very cool tool!
      I guess it might be important for you, Virtual Health Care, for letting doctors sign prescriptions?

    • @VirtualHealthCare
      @VirtualHealthCare Год назад

      @@SupeRails yes in rails 7

    • @VirtualHealthCare
      @VirtualHealthCare Год назад

      And your channel is very good i see your every video and thanks to upload 😍

    • @VirtualHealthCare
      @VirtualHealthCare Год назад

      @@SupeRails example like we make a public surway form of a participant ,the partiticipant has many participant_medical, conditions like back disorder at the end we take signature of the participant ,we can also use devisepasswordless gem, hope you make this amazing video and i wait to watch this in rails 7