Adding Product Reviews with Turbo Stream Actions and Templates

Updated: 

Discover how to implement dynamic product reviews using Turbo Stream actions and templates in Rails, enhancing user experience and SEO performance.

This lesson is from Full Stack Rails Mastery.

In this lesson, we'll dig deeper into Turbo Streams by adding a new feature to our app - user Reviews.

Like we saw in a previous lesson on lazy loading Turbo Frames, we will display user reviews below the product description.

But instead of some hardcoded text, we'll add a new Review model and allow logged in users to post reviews.

We'll use Turbo Streams to instantly prepend new reviews to the list of reviews.