Time - Alex #41
Open
codesrobertson wants to merge 14 commits into
Open
Conversation
…roller test, and helper.
Media RankerFunctional Requirements: Manual Testing
Major Learning Goals/Code Review
Previous Rails learning, Building Complex Model Logic, DRYing up Rails Code
Testing Rails Apps
Overall Feedback
Code Style Bonus AwardsSummaryI'm glad you got this submitted, but it's far from feature complete. You're missing testing, and the entire upvote functionality as well as session and validations. If you push further commits up I'll be happy to look at them and give you updated feedback. |
CheezItMan
reviewed
May 30, 2020
| @@ -0,0 +1,3 @@ | |||
| require "test_helper" | |||
|
|
|||
| describe HomepageController do | |||
| @@ -0,0 +1,4 @@ | |||
| class Vote < ApplicationRecord | |||
There was a problem hiding this comment.
You should also include a validation to ensure the combination of user_id and work_id are unique.
Suggested change
| class Vote < ApplicationRecord | |
| class Vote < ApplicationRecord | |
| validates :work_id, uniqueness: { scope: :user_id, | |
| message: "You can only vote for a work once" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
sessionandflash? What is the difference between them?Assignment Submission: Media Ranker
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection
sessionandflash? What is the difference between them?