Codecast: Getting Started with Rails 7 22: Broadcast Comment Changes to the Article with Turbo @StatelessCode
Codecast: Getting Started with Rails 7 22: Broadcast Comment Changes to the Article with Turbo  @StatelessCode
Uploaded January 2022 | Updated September 2026, 2 weeks ago
This is the 22nd video in the Getting Started with Rails 7 series. In this video Mike uses Turbo Streams from the Hotwire front-end framework (included by default in new Rails applications) to broadcast changes (create, update, destroy) to the collection of comments for an article in real-time.

This video covers:
00:00:10 Introduction
00:04:10 Write failing browser tests for article
00:07:50 Add broadcasts_to :article in the Comment model
00:08:41 Modify the views to include the turbo_stream_from tag
00:10:18 Troubleshoot test failure
00:13:42 Add article dom_id for article to show action
00:15:29 Add div with id="comments" around the comments collection rendering. Tests now passing.
00:16:35 Demonstrate the Turbo Stream behavior using two browsers
00:19:53 Review, commit and push the code

This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Codecast: Getting Started with Rails 7 22: Broadcast Comment Changes to the Article with Turbo300 Videos! 300 Badges!Create a RubyGem 96: Drop Official Support for End-of-Life Ruby 2.7Set up a Salesforce Development Environment on Ubuntu 24.04Why Do Your Own User Experience Research?Codecast: statelesscode.com WordPress 03: Install WP Test Dataset and Create Theme off of Sage 10Get Rails System Tests Working with GitHub ActionsThe Path to Rails 8 - Upgrade Ruby from 3.2 to 3.4 on Rails 7.0Mediocre Karaoke - Time of the Season by The ZombiesThe Path to Rails 8 - Upgrade Tailwind from version 3 to 4 on Rails 7.0Celebrating 200 Stateless Code Videos!Create a RubyGem 95: Consolidate the CHANGELOG to the Master Branch
Stateless Code |

Codecast: Getting Started with Rails 7 22: Broadcast Comment Changes to the Article with Turbo

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER