-
Notifications
You must be signed in to change notification settings - Fork 42
MediaRanker - Angela - Octos #38
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
base: master
Are you sure you want to change the base?
Conversation
Media RankerWhat We're Looking For
|
kariabancroft
left a comment
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.
sorry i just realized that i forgot to submit these comments along with the original review
|
|
||
| get '/votes', to: 'votes#index', as: 'votes' | ||
|
|
||
| resources :users |
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.
Do you need all of these routes?
| </spotlight> | ||
|
|
||
| <categories> | ||
| <top-movies> |
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.
I'm unsure about using these as HTML tags - is the goal here a semantic tag?
| work = Work.find_by(id: params[:id]) | ||
| work.vote.delete_all | ||
|
|
||
| if work |
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.
It would make sense to check for the work variable before you try to delete all of the votes. Additionally, if you set up the relationship to delete dependent entries in the model, you wouldn't need to explicitly do this delete operation here.
| end | ||
|
|
||
| def show | ||
| @votes = Vote.all |
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.
Why would you use all of the votes in this view for a particular work?
| @users = User.all | ||
| end | ||
|
|
||
| def new |
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.
It seems like you created the standard CRUD actions in the controller action, but don't actually need them (or use them)
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
sessionandflash? What is the difference between them?