Hotwire: Online user tracking with turbo streams

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: 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! You can also find more content like this, including premium courses and exclusive community and mentorship to help you level-up! Head over to and use the code RRYOUTUBE for a discount!

Published: Jan 16, 2023

View my video on YouTube