asatwal/myflix_webapp — pull request #1 by asatwal (2014-09-17 21:25:12+00:00)
Title: Added  Video reviews and Controller tests for videos#show, videos#search, Authentication

Contains the following:
1. Add controller tests for videos#show and videos#search
2. Add controller tests for authentication
3. Add video reviews
4. User can review a video

For first (1) and (2) have mainly followed the solutions. However for (3) and (4) Design was based on the voting functionality from the 2nd course.

Here is a summary of my solution for video reviews:

1. Polymorphic Review Model created. There is no need for a polymorphic model in this assignment,
but it may be better for future flexibility.

2. Separate controller for review not created like the solutions. Instead I opted for review action to the Video Controller. What is better practice ?

3. Used bootstrap form_for in the show video form to display errors back to use on invalid review inputs.

4. Added the average_rating calculations to the Video Model Layer. Unsure whether this should go into a helper, but I thought it was better placed in the model layer.