КОМЕНТАРІ •

  • @jordanell4236
    @jordanell4236 2 роки тому +4

    I'm coming back to rails for the first time since Rails 4. Thank you for everything you are doing to support the Rails ecosystem and in particular Rails 7!

    • @mixandgo
      @mixandgo 2 роки тому

      Welcome back Jordan :) A lot has changed since v4.

  • @traviszito6408
    @traviszito6408 Рік тому +1

    Really like your explanation here, very clear and you didn't rush through things too fast. Was able to get search in my app up and running in no time!

  • @ledockol
    @ledockol 2 роки тому +1

    Great video. Many thanks to the author!
    A few notes:
    1) Stimulus action without bind function:
    this.submit = debounce(this.submit, 300)
    submit = () -> {
    this.element.requestSubmit()
    }
    Like this: github -> secretpray (Hotwire-CRUD-MODAL) in search_controller.js
    2) I would also add search launch only after two characters entered, reset search results (in turbo_frame), user search history.

    • @mixandgo
      @mixandgo 2 роки тому

      Thank you for your suggestions

  • @TheStalinBR
    @TheStalinBR 7 місяців тому

    Loved the debounce hint.

    • @mixandgo
      @mixandgo 7 місяців тому

      I'm glad you found it helpful.

  • @acidtib
    @acidtib Рік тому

    thank you for the video, you just made it all click in my head.

  • @kelvin.s420
    @kelvin.s420 Рік тому

    Excellent video. Thank you!

  • @ReizRobert
    @ReizRobert Рік тому

    Very useful video. Thx for sharing!

  • @muniruddin8295
    @muniruddin8295 Рік тому

    Nice one and super helpful. Thanks for sharing!

    • @mixandgo
      @mixandgo Рік тому

      Glad it was helpful!

  • @hardikvekariya8067
    @hardikvekariya8067 11 місяців тому

    amazing tutorial men!!

    • @mixandgo
      @mixandgo 11 місяців тому

      Thanks man

  • @cmthimmaiah
    @cmthimmaiah 2 роки тому

    Amazing, thank you

    • @mixandgo
      @mixandgo 2 роки тому

      You're welcome :)

  • @bennadel
    @bennadel Рік тому

    This was really great, thank you. I'm currently trying to learn Hotwire after Angular, which is a very different mental model. Seeing the search form work in combination with turbo-frames and the search action on the main controller was great. But, I've also run into issues where Hotwire requires a Form post to result in a Location redirect (or throws an error). I see in your demo that you're using a GET request; I assume this is (in part) to get around this issue (and in part to make the URL shareable). Just wondering if you have any advice for something like this where it has to be a POST... though, I guess I could use a turbo-stream at that point. Anyway, awesome stuff!

    • @mixandgo
      @mixandgo Рік тому

      I'm not sure I understand your question. Is there a reason you cannot use a POST?

    • @bennadel
      @bennadel Рік тому

      @@mixandgo In this case, you're re-rendering the same page with the form submission. Turbo Drive requires POST requests to either result in an error or in a 3xx page redirect. But, by using the GET request, you can get around that limitation. Unless, you respond with a Turbo Stream. Anyway, I don't mean to go off on a tangent. It's a great video - this stuff is just swimming around in my brain.

  • @artursz7356
    @artursz7356 2 роки тому

    debounce part pretty interesting

  • @videoeditorshiva
    @videoeditorshiva 2 роки тому

    I did not try Hotwire yet but was curious can we apply this in api only application of rails

    • @mixandgo
      @mixandgo 2 роки тому +1

      Not really. It's for building UIs.

  • @gomitchell
    @gomitchell 2 роки тому

    You loaded the denounce using yarn. Do you need to use webpacker to load the JS? I thought rails 7 uses import maps to load JS dependencies?

    • @mixandgo
      @mixandgo 2 роки тому

      You don't need to, but the option is still available.

  • @daniloalves7440
    @daniloalves7440 2 роки тому +1

    I'm from a Django background and I'm studying ruby but I was curious about how things are done in Rails
    I see this video just for curiosity and I like that so much because it's so simple!

    • @mixandgo
      @mixandgo 2 роки тому +1

      Yes, that's what attracted a lot of people to it.