Skip to content

Conversation

@bcmdarroch
Copy link

@bcmdarroch bcmdarroch commented Apr 15, 2017

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I wrote the method spotlight, which orders all Works by vote_count, a cache_counter. Since it orders them ascending, I return the last Work, which has the most votes.
Describe how you approached testing that model method. What edge cases did you come up with? The edge cases are multiple works with the highest number of votes; and when all works have 0 votes.
Describe an edge case test you wrote for a controller I wrote a test for a Work created without a category to test the category validation.
What are session and flash? What is the difference between them? Flash briefly stores data that displays on the screen then disappears on the next request. Session keeps track of data throughout a user's session until they close the browser.
Describe a controller filter you wrote. Didn't write any.
What was one thing that you gained more clarity on through this assignment? To trust my instincts when it comes to making early design decisions!
What is the Heroku URL of your deployed application https://bcmd-media-ranker.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? I think a little more guidance on the relationships would have been helpful. Though I understand designing relationships is an important skill, I'm still not fully aware of all the consequences of choosing one approach over the other. It'd be helpful to learn the pros and cons of going with one controller vs. many controllers, etc. Maybe, at this level of project, provide example approaches that people might follow - we'll still face challenges in implementing but we'll know we're at least on a right path.
Additional Notes: To clarify, I was working with books/movies/albums controllers until Friday when I bailed on them, which is why those files are mostly commented out. Now all my code is in sessions, users, votes, and works. I'd like feedback on where I could have moved business logic from the controllers to the models. Also I have some weird bugs with login and upvote. Sometimes after I log in as a new user, when I upvote it logs me out. Also, I can't figure out how to get the "Fail to upvote" flash message to show up. It always shows "Successfully upvoted" even if the Vote model isn't affected. Finally, my last upvote test won't pass, even though it works on the site. Thanks! :)

…, played with create form but needs more work
@CheezItMan
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and well-named branches, excellent!
Comprehension questions Check and I'll look below for the additional feedback.
General
Rails fundamentals (RESTful routing, use of named paths) Well done
Semantic HTML Well done
Errors are reported to the user On the application.html.erb on line 35 `
<%= msg %>
has an error. The class attribute doesn't have a close quotation or end >. Forupvotethe if statement should probably look likeif @vote.id` and the upvote else should probably look like how I have entered below.
Business logic lives in the models I would have put the upvote method and the methods to calculate the top 10 & spotlight methods into the model.
Model testing Overall well done here. Nicely organized.
Controller testing You do need to also test a post request to log in. The "should redirect to root after voting" should also redirect back to work_path(work.id) as well. I would also test for an invalid message when attempting to delete an already deleted work.
Wave 1 - Media
Splash page shows the three media categories Check
Basic CRUD operations on media are present and functional Check
Wave 2 - Users and Votes
Users can log in and log out Check
The ID of the current user is stored in the session Check
Individual user pages and the user list are present Check
A user cannot vote for the same media more than once Check
All media lists are ordered by vote count Check
Splash page contains a media spotlight Check
Media pages contain lists of voting users Check
Wave 3 - Styling
Foundation is used appropriately Check
Look and feel is similar to the original Very nicely done
Overall This was a tough project and you had almost all the requirements in. Nice work! I think the suggested changes I added will also fix the upvote bugs including the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants