Skip to content
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

Leaves - Natalie Tapias #42

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open

Conversation

NatalieTapias
Copy link

@NatalieTapias NatalieTapias commented Oct 21, 2019

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I wrote a custom model method to return a list of media by category. This is a class method which returns all works which match a particular category(albums, books, or movies).
Describe how you approached testing that model method. What edge cases did you come up with? I tested expected behavior, for example, that the all_movies method should return an array of all movies in the works category. I also tested that each of these works must have the category of "movie."
What are session and flash? What is the difference between them? Session is a hash-like object used to keep track of data throughout a session, which normally ends when a user closes their browser. Flash is also a hash-like object, used specifically to store data that persists only through the next request-response cycle.
What was one thing that you gained more clarity on through this assignment? I am a little bit more comfortable troubleshooting unexpected behavior in the browser. For example, it took me a lot of investigating to figure out that my session stored data for a deleted user after performing a rails db:reset and broke my site. I added in some logic to allow the site to render even if a session's user_id doesn't correspond with a user in the database.
What is the Heroku URL of your deployed application? https://nmt-media-ranker-v2.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? I set out with an ambitious plan to test all controller tests. It might be good to have a mid-week mini-pull request or check-in with a neighbor to make sure that we are all on track. I definitely learned a lot from this project!

…ersController actions. Updated views to confirm that session are displaying.
@beccaelenzil
Copy link

Media Ranker

What We're Looking For

Manual Testing

Workflow yes / no
Deployed to Heroku check
Optional: Look and feel is similar to the original (consider styling and layout) check
Before logging in
On index page, there are at most 10 pieces of media on three lists, and a Media Spotlight yes
Can go into a work's show page yes
Verify unable to vote on a work, and get a flash message yes
Can edit this work successfully, and get a flash message yes
Can go to "View all media" page and see three lists of works, sorted by vote yes
Verify unable to create a new work when the form is empty, and details about the validation errors are visible to the user through a flash message This validation is missing -- I was able to create a blank work
Can create a new work successfully. Note the URL for this work's show page yes
Can delete this work successfully yes
Going back to the URL of this deleted work's show page produces a 404 or some redirect behavior (and does not try to produce a broken view) When I try to access my deleted media I get the Flash message "Media edit failed to save". It should be something of the sort "This work does not exist"
Verify that the "View all users" page lists no users (except what is produced by db seeding) yes
Log in
Logging in with a valid name changes the UI to "Logged in as" and "Logout" buttons yes
Your username is listed in "View all users" page yes
Verify that number of votes determines the Media Spotlight yes
Voting on several different pieces of media affects the "Votes" tables shown in the work's show page and the user's show page yes
Voting on the same work twice produces an error/flash message, and there is no extra vote yes
Log out
Logging out showed a flash message and changed the UI yes
Logging in as a new user creates a new user yes
Logging in as an already existing user has a specific flash message The flash message is the same for a new and returning user.

Targeted Code Review

Area yes / no
git commits were small and atomic, with useful messages yes
Routes file uses resources for works yes
Routes file shows intention in limiting routes for voting, log-in functionality, and users yes
The homepage view, all media view, and new works view use semantic HTML yes
The homepage view, all media view, and new works view use partials when appropriate yes
The model for media (likely named work.rb) has_many votes yes
The model for media has methods to describe business logic, specifically for top ten and top media, possibly also for getting works by some category yes
Some controller, likely the ApplicationController, has a controller filter for finding a logged in user see comment
Some controller, likely the WorksController, has a controller filter for finding a work yes
The WorksController uses strong params yes
The WorksController's code style is clean, and focused on working with requests, responses, params, session, flash yes

Targed Test Review

Area yes / no
There are valid fixtures files used for users, votes, and works yes
User model has tests with sections on validations (valid and invalid) and relationships (has votes) see comment re: relations
Vote model has tests with sections on validations (valid and invalid) and relationships (belongs to a user, belongs to a vote) yes
Work model has tests with sections on validations (valid and invalid) and relationships (has votes) these tests are missing.
Work model has tests with a section on all business logic methods in the model, including their edge cases yes

Overall Feedback

Great job overall! Your implementation matches the demo site very closely, and the learning goals for this assignment were definitely met. You created a complex rails project with multiple models/relationships, fancy views, and tests on validations and models. I've left a few in line comments for your review. Keep up the hard work!

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