In this episode I'll show you how to track which users are currently online. We'll use Hotwire and Turbo Streams, so we don't need to write any frontend JavaScript code or action cable consumers! The source code for this episode is available here: https://github.com/phawk/action-cable-online-status 00:00 Introduction 00:14 Sign In Demo 00:38 Explaining Code 02:01 Adding Action Cable 02:33 Online Channel File 03:26 Application Cable Connection 04:14 Turbo Stream 05:42 User Model Live 06:27 Real-Time Updates 07:28 Active on Create & Destroy 08:12 Conclusion --- Has this video helped you out? Consider buying me a coffee to say thanks and support future content like this, thanks! https://app.payhere.co/rapid-ruby/buy-me-a-coffee-aa4618e4-45d1-4727-81b9-2d081449d61d You can also find more content like this, including premium courses and exclusive community and mentorship to help you level-up! Head over to https://rapidruby.com and use the code RRYOUTUBE for a discount!
Published: Jan 16, 2023