Ruby on Rails Tutorial | Build a Book Review App – Part 4

This is the final part in a four part series where we build a Book Review application in Ruby on Rails from start to finish. In this part, we add the ability for users to leave a review for a book. The review consists of a comment and a 5 star rating. We will use raty.js for the 5 star rating functionality. We will also finish laying out and styling the application.

Find the other parts here:
Part 1:
Part 2:
Part 3:

Link to GitHub repository:

Video Reference Guide:

0:00 Introduction
0:18 Creating the Review model
2:00 Add user_id to reviews
3:15 Add book_id to reviews
3:45 Create associations
4:30 Add nested routes for reviews
6:20 Create Reviews controller
6:37 Add ability to create new reviews
14:22 Create review partial file and render reviews on book show page
16:21 Add edit/delete functionality for reviews
26:02 Add raty.js to the application
27:48 Add 5 star rating functionality
32:35 Add an average rating for each book
35:28 Add user authentications
37:52 Add layout and styling

Thank you for watching!

Be sure to follow me on Twitter 🙂


  • Febin George

    Thank you so much for making this series!
    I gave you a thumbs up after watching the first part. From then on for every part, I first give a thumbs up and then start watching.
    I see that you haven't made any new content from a long time. You're a great teacher and should definitely continue making more videos to help others out!
    Thanks again.

  • rot rose

    You are an amazing teacher, even 3 years later after the release of your video, I can follow the whole progress along without significant problem. Really thank you.

  • Al Barleta

    Why can't I access
    I can access it in the console but not in the views. (which means, the association is set up correctly)

  • Kaari Strack

    Really wonderful videos, thank you so much! One thing though, the Raty plugin no longer exists as a stable JS download! 🙁

  • Yuri Sales

    begginer question! If i use rails-assets-raty what should i put on 'path'? I've tried rails-assets-raty and cannot find the stars's location!

  • Dastan Abeuov

    the librarian does not know how to do this. It is necessary to include pi creatures of the book to add download formats. Then show it ready for the main page.

  • Ash Abera

    Hi Ryan
    Thank you very much for your video tutorials. Literally, you changed my life. My boss asked me to learn ruby on rails to do some of his projects. I brows so many tutorial and I was frustrated. I almost give up. Luckily, I stumble upon your tutorial and here I am gaining a lot confidence coding with Ruby on Rails.
    Do you have any plan to produce videos on responsive Ruby on Rails?

  • Imadabathuni Gopikrishn

    Very useful tutorial , can you please tell me how to deploy this app on heroku , how to deploy database ? Do we need to change any gems in Gem file . Thank you

  • John G

    4 hours of work in rails, how long in Django? I say 8-10, java using say Spring MVC, 60 hours, c# with mvc 40-50 hours. Sound about right?

  • Syed Farhan Haider

    Just wondering… Why didn't you use any Gem for rating system??

     There are a couple of gems available. Nice work though. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *