Back again with another Rails talk!
Today I do a quick run through of getting Rails 6.1 working with ActionCable and Stimulus (or Stimulus JS, if you prefer). And no, I’m not doing a messaging app, I am doing an app that pushes out object updates to a webpage.
I am using the new Stimulus 2, which was released on December 4, 2020
Find it here: https://stimulus.hotwire.dev/
00:00 Introduction
01:55 The Environment / Creating the Rails App
04:00 Create a resource & seed data
06:50 Set path, controller, index view
08:35 Add Bootstrap
09:30 Show Data on Page pt 1
12:25 Move view to partial
14:20 Add Stimulus.js (https://stimulus.hotwire.dev/)
17:30 Creating a Stimulus controller
22:00 Create ActionCable Channel
28:00 Fill out Stimulus Controller
35:00 Set the model to broadcast itself
38:00 The Redis secret
40:00 Update model to render
41:00 Final Stimulus Controller lines
43:00 Summary
➡️ Source code and instructions are available on my Github here: http://bit.ly/railsCableGuy
Some people online just talk – I just do. One of my major SaaS products out there is Zonmaster.com (https://public.zonmaster.com) THE Amazon AutoResponder and Customer Management tool for Amazon Sellers. Join over 17,000 other Amazon Sellers and sign up today!
Looking for great hosting? I’ve been using DigitalOcean for 7 years and they have never let me down. Amazing.
Check them out here https://m.do.co/c/f1c6edf8597f and get $100(!!!) free credits towards the cost of servers.
#techEntrepreneur #RubyOnRails #softwareDevelopment