Stateless Code | Codecast: Getting Started with Rails 7 22: Broadcast Comment Changes to the Article with Turbo @StatelessCode | Uploaded January 2022 | Updated October 2024, 3 hours 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.
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.