How to use Hotwire in Rails

Sdílet
Vložit
  • čas přidán 22. 12. 2020
  • ► Check out gorails.com for Pro episodes and more!
    ► SaaS business template for Ruby on Rails with built-in features like Payments, Teams, and much more: jumpstartrails.com
    ► Ruby on Rails hosting with Hatchbox.io: hatchbox.io
    ► Learn how to add Stripe Payments (with SCA support!) with Ruby on Rails: courses.gorails.com/payments-...
  • Věda a technologie

Komentáře • 61

  • @bernarduslopez7074
    @bernarduslopez7074 Před 3 lety +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 Před 3 lety +4

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

    • @ranska2506
      @ranska2506 Před 3 lety +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 Před 3 lety +1

      And laravel copying ideas from Rails

    • @dannykorbyn8361
      @dannykorbyn8361 Před 2 lety

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

  • @erickzelaya3651
    @erickzelaya3651 Před 2 lety +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 Před rokem +2

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

  • @joey2545
    @joey2545 Před 3 lety +1

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

  • @PizzaManNick
    @PizzaManNick Před 3 lety +4

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

  • @Alx91xd
    @Alx91xd Před 2 lety +2

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

  • @redlightmikey
    @redlightmikey Před 2 lety +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  Před 2 lety +2

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

    • @redlightmikey
      @redlightmikey Před 2 lety

      @@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?

  • @sriramv6701
    @sriramv6701 Před 2 lety +1

    This is fascinating and almost feels like magic!!

  • @satreuh82
    @satreuh82 Před 3 lety +2

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

  • @eonacademy5036
    @eonacademy5036 Před 2 lety +1

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

  • @MalachiRails
    @MalachiRails Před 3 měsíci +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  Před 3 měsíci

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

  • @johncerpa3782
    @johncerpa3782 Před 3 lety +1

    Pretty cool feature, nice video

  • @RoshanTamilsellvan
    @RoshanTamilsellvan Před 3 lety +3

    Pretty fascinating!

  • @axelb423
    @axelb423 Před 3 lety

    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?

  • @Ericelrojo32
    @Ericelrojo32 Před 3 lety +2

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

  • @vidurpunj
    @vidurpunj Před 6 měsíci +1

    @chris thanks for sharing.

  • @IvanRaszl
    @IvanRaszl Před 3 lety

    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?

  • @datamakingsoftwaresolution4461

    Nice one!

  • @navnath8580
    @navnath8580 Před 3 lety

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

    • @GorailsTV
      @GorailsTV  Před 3 lety

      github.com/gorails-screencasts

  • @whyimustusemyrealname3801

    18:20 when the turbo engine started

    • @quiettalha
      @quiettalha Před 3 lety

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

  • @petersimondiesta9764
    @petersimondiesta9764 Před 3 lety +1

    Hi what is the difference of stimulus reflex and hotwire?

  • @andreseduardo5991
    @andreseduardo5991 Před rokem +1

    15:54
    Edit tweets is real now

  • @yzhang2008
    @yzhang2008 Před rokem +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.

  • @andarba2148
    @andarba2148 Před 3 lety

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

  • @josephandres4324
    @josephandres4324 Před 3 lety

    is Hotwire the Stimulus Reflex killer?

  • @micharosiak7482
    @micharosiak7482 Před 2 lety

    How it works with SEO?

  • @fernandomarques281
    @fernandomarques281 Před rokem +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 Před 2 měsíci

      I have it too, did you find a solution?

  • @chrishabgood8900
    @chrishabgood8900 Před 6 měsíci

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

  • @vishalsinghrathore7670
    @vishalsinghrathore7670 Před 2 měsíci

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

  • @DevBishwasBh
    @DevBishwasBh Před rokem +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  Před rokem +1

      You cant access the request in a model.

    • @DevBishwasBh
      @DevBishwasBh Před rokem

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

  • @rahulk6130
    @rahulk6130 Před rokem

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

  • @weefunkster
    @weefunkster Před 3 lety

    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  Před 3 lety

      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. 👍

  • @Qasibr
    @Qasibr Před 2 lety

    I wonder if this works with Rails 7.

    • @GorailsTV
      @GorailsTV  Před 2 lety

      Rails 7 comes with Hotwire by default. 👍

  • @WinstonCodesOn
    @WinstonCodesOn Před 3 lety

    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  Před 3 lety +1

      Just include broadcastable in whatever class you want.

  • @programmingcheatsheet

    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 Před rokem

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