-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submitting MediaRanker #31
base: erg/master
Are you sure you want to change the base?
Conversation
…nd controller spec to begin drying up tests
…ation in the model
…changed some variable names throughout to make more clear
def upvote | ||
album = Album.find(params[:id]) | ||
album.rank += 1 | ||
album.save |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 There's also a cool .increment!
method that does the same thing as lines 9-10.
This looks awesome! 😄 It might be worth putting controller finds like Great job! |
Submitting MediaRanker final project. Right now my controller tests are mostly testing that the pages are re-directing to the right place, but I was struggling with coming up with tests to make sure that the desired action of creating/deleting/editing was happening beforehand. I was not sure if this was needed, since this is provided by active record, but wanted to be sure that I was actually doing what was intended.