How to use Hotwire in Rails

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

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

  • @bernarduslopez7074
    @bernarduslopez7074 3 года назад +50

    Another prove that rumors about Ruby is dying are not true. Ruby & Rails are safe and sound. In fact, they get improve and faster.

    • @AmitSavani
      @AmitSavani 3 года назад +4

      As long as DHH is actively using Rails, no change that Ruby can die.

    • @ranska2506
      @ranska2506 3 года назад +1

      Well say Mr !!! Using it since 2006 every year I hear the same music, every year rails just get better.
      And more than everything still happy to use it \(♥_♥)/

    • @ZolzayaErdenebaatar
      @ZolzayaErdenebaatar 3 года назад +1

      And laravel copying ideas from Rails

    • @dannykorbyn8361
      @dannykorbyn8361 3 года назад

      @Baylor Jaxton Yea, been using InstaFlixxer for years myself :)

  • @erickzelaya3651
    @erickzelaya3651 2 года назад +9

    This Is just mind blowing. I'm new to Ruby on rails but I'm loving everything I saw until now. Thanks Chris

    • @DevBishwasBh
      @DevBishwasBh 2 года назад +2

      I am also planning to learn Ruby on rails. Shifting from Python/Js webdev backgraound.

  • @redlightmikey
    @redlightmikey 2 года назад +2

    This. Just. Blew. My. Mind. I've been on Rails 4.2.4 for so long and just upgrading. Wow. Can't wait to use this.

    • @GorailsTV
      @GorailsTV  2 года назад +2

      I know right?! One of the coolest things to happen to web development in a long time.

    • @redlightmikey
      @redlightmikey 2 года назад

      @@GorailsTV do you have a video or example on how this could make load times faster? I have a scenario where I’m loading 1000s of records and it takes like 10 seconds to load the page - could this help?

  • @MalachiRails
    @MalachiRails 10 месяцев назад +2

    Hey man just want to say I love your videos and am Inspired by them! Thanks and keep up the fantastic work!. IN my next course im gonna try out Hatchbox to host the Rails app!

    • @GorailsTV
      @GorailsTV  10 месяцев назад

      So happy to hear that! If you have any trouble with Hatchbox you know where to find me!

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

    Ruby is the most pretty and graceful programming language. Rails is the best show off of Ruby. It was, it is ,and I’ll be.

  • @eonacademy5036
    @eonacademy5036 2 года назад +1

    We love you Chris! 😺greetings from Mexico 😺🇲🇽

  • @satreuh82
    @satreuh82 3 года назад +2

    Thanks a lot for this video, please your help with more about this new approach.

  • @joey2545
    @joey2545 3 года назад +1

    Very cool. Looking to dig into this more and hoping to see more videos from you about this new magic!

  • @PizzaManNick
    @PizzaManNick 3 года назад +4

    This is fantastic, thank you so much for teaching us!

  • @Alx91xd
    @Alx91xd 3 года назад +2

    Thanks for the video, now it looks much clear for me! Love these kind of magic stuff :)

  • @sriramv6701
    @sriramv6701 2 года назад +1

    This is fascinating and almost feels like magic!!

  • @Ericelrojo32
    @Ericelrojo32 3 года назад +2

    Which color theme do you use in your terminal and vim?
    I really like it

  • @whyimustusemyrealname3801
    @whyimustusemyrealname3801 3 года назад +4

    18:20 when the turbo engine started

    • @quiettalha
      @quiettalha 3 года назад

      I guess it his MacBook's fan kicking in :D He likes old macs rather than the newer ones maybe :O

  • @petersimondiesta9764
    @petersimondiesta9764 3 года назад +1

    Hi what is the difference of stimulus reflex and hotwire?

  • @RoshanTamilsellvan
    @RoshanTamilsellvan 3 года назад +3

    Pretty fascinating!

  • @axelb423
    @axelb423 3 года назад

    Hello, thanks for this awesome tutorial. I have a question, with turbo frame, the url doesn't change, an option is available or not for handle url for a good SEO?

  • @IvanRaszl
    @IvanRaszl 3 года назад

    As I understand, the benefit of html over wire is that for example when you increment Likes you could reach out to the database very quickly if needed to implement some sort of business logic in the backend before updating the html in the user's browser, right? For example, we could limit the number of likes a user can give per 24h. Can you confirm this is correct?

  • @johncerpa3782
    @johncerpa3782 3 года назад +1

    Pretty cool feature, nice video

  • @DevBishwasBh
    @DevBishwasBh 2 года назад +1

    Thanks a lot, it was extremely helpful. But how can I get `request.remote_ip` inside the element after using after_save_commit.

    • @GorailsTV
      @GorailsTV  2 года назад +1

      You cant access the request in a model.

    • @DevBishwasBh
      @DevBishwasBh 2 года назад

      @@GorailsTV I mean, is there anyway I can access it inside my partial after using `after_save_commit`

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

    man, many years ago, I has to figure out how to update the front end from a back end change. AHHHHH

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

    @chris thanks for sharing.

  • @fernandomarques281
    @fernandomarques281 2 года назад +1

    Question:
    I'm stuck on minute 4:44. For some reason, while I can see the [ActionCable] Broadcasting to tweets, and everything is identical to what he is doing, my page does not get updated. My redis is set up, everything is set up!
    Did anyone go through this?

    • @Khoadzai
      @Khoadzai 8 месяцев назад

      I have it too, did you find a solution?

  • @datamakingsoftwaresolution4461
    @datamakingsoftwaresolution4461 2 года назад +1

    Nice one!

  • @Darkhumorshort1
    @Darkhumorshort1 9 месяцев назад

    can you please give us you code file so we can see that where we. are wrong

  • @navnath8580
    @navnath8580 3 года назад

    Do u upload this repo anywhere or just show it here?? Your videos are so great I love them

    • @GorailsTV
      @GorailsTV  3 года назад

      github.com/gorails-screencasts

  • @andarba2148
    @andarba2148 3 года назад

    I can’t find after_create_commit { broadcast_append_to ´´model’´ } in the documentation. Does anyone know where I can find it.

  • @josephandres4324
    @josephandres4324 3 года назад

    is Hotwire the Stimulus Reflex killer?

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

    I take it this uses rails 6 since 7 does not accept the “Hotwire:install” command.
    Very Nice video.

  • @micharosiak7482
    @micharosiak7482 3 года назад

    How it works with SEO?

  • @andreseduardo5991
    @andreseduardo5991 2 года назад +1

    15:54
    Edit tweets is real now

  • @weefunkster
    @weefunkster 3 года назад

    This completely breaks jumpstart pro for me, Chris
    ```
    Module not found: Error: Can't resolve 'turbolinks' in '...javascript/packs'
    ```
    Fixed by commenting out turbolinks from all of the js pack files, removing the gem and removing the turbolinks function from devise.rb at the bottom
    Just hope it doesn't create a hive of bugs

    • @GorailsTV
      @GorailsTV  3 года назад

      Hotwire replaced Turbolinks do you have to remove it. We'll upgrade Jumpstart Pro shortly now that they've fixed a few bugs in Hotwire. 👍

  • @WinstonCodesOn
    @WinstonCodesOn 3 года назад

    That seems a bit model heavy. Fine for this simplistic case, but for more complex applications I would try to encapsulate those broadcast events out of the model and into a more business-logic oriented layer like an interactor. I wonder how you would do this if on that invalid tweet response, rather than replacing the form you display the validation errors on a more uniform part of the page like a floating stationary div. Or maybe you'd want multiple page elements to be affected. Would it take some sort of stimulus JS handler to achieve that?

    • @GorailsTV
      @GorailsTV  3 года назад +1

      Just include broadcastable in whatever class you want.

  • @Qasibr
    @Qasibr 2 года назад

    I wonder if this works with Rails 7.

    • @GorailsTV
      @GorailsTV  2 года назад

      Rails 7 comes with Hotwire by default. 👍

  • @programmingcheatsheet
    @programmingcheatsheet 2 года назад

    I'd greatly appreciate if you could actually do practical SPA application that covers beginning to end setup, similar to your rails for beginners tutorial which was fantastic, but is now outdated in many ways. My biggest frustration with this video is you just magically have your index.html.erb set up in a way that it's coherent with the code you're writing, but when I run "rails g scaffold Tweet" I do not get the same index.html.erb you have with a form and render tweets.
    The minute I try to change that context to anything else, everything goes haywire because rails just makes a lot of assumptions about the names people are going to use and code that people are going to write

  • @kennelmask1
    @kennelmask1 2 года назад

    So is this still relevant at all, now that Hotwire is depracated?

    • @GorailsTV
      @GorailsTV  2 года назад +2

      Hotwire is not deprecated