-
Notifications
You must be signed in to change notification settings - Fork 43
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
Carets - Maria - Media Ranker #35
base: master
Are you sure you want to change the base?
Conversation
…created link to logged in user's show page
Media RankerWhat We're Looking For
|
Overall, you got the basic functionality of the site, and you got logging in, flash messages, and voting working for the most part. Good job! There were just a few major bugs:
In terms of testing: Also, in order to make your VotesController test pass, I've added some comments about making that work. |
describe VotesController do | ||
it "should create a vote" do | ||
proc { | ||
post votes_path, params: { vote: {user_id: 2, work_id: 9 }} |
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.
Instead of adding in user_id
into params[:vote][:user_id]
, you need to pass it in through session. To get user_id into session, before line 5 add the following line:
post '/login', params: {username: users(:bob).username}
and then modify this line (line 6) to the following
post votes_path, params: { vote: {work_id: 9 }}
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
session
andflash
? What is the difference between them?