-
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
Lauren Cardella -- Carets #24
base: master
Are you sure you want to change the base?
Conversation
…rce and custom home path to routes.Add first works controller test for home.
…tion to home view. Add pseudo code for top_work to work model. Having trouble conceptualizing how to list works by votes when votes don't exist yet. Need to start a new branch for users and votes before assembling the views.
…_ten class method to Work.
…ixrture data, and tests for work model. Getting an ActiveRecord error when trying to run my tests.
…ication_year data type from date to integer. Add works test data. All works validations tests passing.
…tests and controller methods. All tests passing.
…x page. Add content to work show view. Add show test for works controller. Add users controller, another user fixture, edit resources for users in routes, add index and show tests to users controller tests.
…o edit view. Write positive test cases, all passing.
…nks to user index page. Build out show view. Update user controller test to use fixture.
… users controller. Build login_form view. Add users controller test for login, new user, and logout. All tests passing.
…in users and works. Add votes controller.
…e. Define home method in works controller to return list of top ten works in each category. Build out and style home view.
… path. More style updates. 1 votes controller test not passing, but site is functioning as expected.
Something fishy is happening with your project for me! When I run the tests, I get a bunch of errors about Besides voting not working, this is the only other bug I saw:
I'm adding comments about how to fix voting for your code base, but here's the summary:
and then modify the work show view to pass in the work_id as such
Finally, you can update your votes_controller_test.rb to use that new path like so
I'm adding a separate comment about getting |
def create | ||
vote = Vote.new | ||
if session[:user_id] && !already_voted | ||
vote.user_id = params[:user_id] |
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.
your user_id is stored on session
, not params
Media RankerWhat We're Looking For
|
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
session
andflash
? What is the difference between them?