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

Amy Lee -- Carets #26

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

Amy Lee -- Carets #26

wants to merge 37 commits into from

Conversation

ayjlee
Copy link

@ayjlee ayjlee commented Oct 16, 2017

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I wrote a method for my Work model, self.sorted_by_votes(category), that would return an array of the works of the specified category in descending order by number of votes each work had.
Describe how you approached testing that model method. What edge cases did you come up with? I tested to to make sure that each work returned by the sorted_by_votes method was of the same category as the category given, and made sure that the vote counts for each item in the array was equal to or smaller than that of the work before it.
Describe an edge case test you wrote for a controller I wrote a test to make sure that a browser is taken to a 404 page if they try to access a User's show page after the user has been deleted.
What are session and flash? What is the difference between them? 'Session' and 'Flash' are hash-like objects that gives us more information based on controller actions that a user has triggered in our app, which we can then use for further action. Session gets data from a controller action, and that data is available until the user closes the browser unless explicitly deleted by another controller method. Session is often utilized to keep track of a user's login state. Flash messages also get data from a controller method, but the data is available for a shorter amount of time. Standard flash data persists for the rest of the request cycle and the next complete request cycle, while flash.now data is only available for the rest of the current request cycle.
Describe a controller filter you wrote. I wrote a controller filter to find a work by it's id for the Work controller, and was able to use the controller filter to get the work for my show, edit, destroy, and and update methods. I also wrote a controller filter to require that a user is logged in before being able to create a vote (upvote a work).
What was one thing that you gained more clarity on through this assignment? implementing flash notices in an app.
What is the Heroku URL of your deployed application https://mysterious-gorge-96097.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? Timing for learning new materials and concepts that will be used in the project, like session, flash, and Foundation, seemed rushed in that I felt that I did not have adequate time to grasp the application of this new knowledge in class before trying to apply it to our project. It would be nice to try some in class examples together to explore together how we might use these concepts: for instance, being able to flash a success/failure message and display errors together.

…uniqueness to the Work model, tested validations for Work model
…delete a work from their show page, tested that a work deletes successfully
…ble, pseudocode for upvote method added to Work model
…ting, setup view of Votes on the Work's show page and User's show page, added link to upvote from All Media page
…ored login/logout method using SessionsHelper methods, added preliminary logic for requiring login to vote, added buton for logout, added display logic in application html to show buttons depending on login status, added route to logout
…aying separately but should display together
@CheezItMan
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits, and good commit messages. One request, please pick a Github Avatar.
Agile practices (trello board) NA
Comprehension questions Check, I agree with the shortened week the project and material was a bit rushed.
General
Rails fundamentals (RESTful routing, use of named paths) Some problems here for example votes_create GET /votes/create(.:format) votes#create This route doesn't seem to be RESTful. Otherwise well done.
Semantic HTML Good use of Semantic HTML
Errors are reported to the user Check, well done.
Business logic lives in the models Check, you've got sorting done here.
Models are thoroughly tested, including relations, validations and any custom logic Some testing, No testing for if the user/work IDs for Vote are not unique. Also the testing for the order of the sorting methods only tests 2 items in each category (the 1st an d last).
Controllers are thoroughly tested Some negative tests missing for WorksController like trying to visit a show page with an invalid or nonexisting ID. Also testing that if you delete a work it also deletes all votes for that work. Good work logging in with the controller tests. You also need to work on testing status codes.
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, well done
Splash page contains a media spotlight Check
Media pages contain lists of voting users Check
Wave 3 - Styling
Foundation is used appropriately Check! Good start on using Foundation!
Look and feel is similar to the original Fairly similar
Overall Nice work, it was a tough week with a compressed schedule, but you did a pretty good job on MediaRanker. You do need to work on testing, but that shouldn't be a surprise. I would make testing a bit of a focus on bEtsy.

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