Skip to content

Jou-Jou's MediaRanker#22

Open
jjousun wants to merge 31 commits intoAda-C7:masterfrom
jjousun:master
Open

Jou-Jou's MediaRanker#22
jjousun wants to merge 31 commits intoAda-C7:masterfrom
jjousun:master

Conversation

@jjousun
Copy link
Copy Markdown

@jjousun jjousun 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 a class method in the Vote model called already_created, which takes in two integer parameters - the work_id and user_id. It checks all the votes to find if any votes have both the work_id and user_id that match the given parameters. It returns a boolean if both are present and match. This method is called in the VotesController, in the upvote method. A vote is only counted if already_created is false.
Describe how you approached testing that model method. What edge cases did you come up with? I wasn't able to get to testing models and controller. For this custom method, I think it should return true if the work_id and user_id exist for this vote, and return false if this combination doesn't exist for any votes.
Describe an edge case test you wrote for a controller One edge case was for the UsersController's show method. It should show a 404 when a user can't be found.
What are session and flash? What is the difference between them? Both flash and session are special hash-like objects. Flash is used for displaying messages from the controller to the view - once displayed, they disappear. Flash is good for denoting success or failure in submitting forms. Session is used to track data about a user for the time that they are in the 'session,' or until they close their browser. Unlike flash, it persists from one request to another.
Describe a controller filter you wrote. n/a
What was one thing that you gained more clarity on through this assignment? I think I got more clarity with how models relationships, since now we know about ERD and ActiveRecord relationships. There are still a lot of parts of creating a Rails app that I still feel shaky on, however.
What is the Heroku URL of your deployed application https://morning-gorge-21632.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? I kind of wish we had more time for this project! I learned a lot, which is always good, but I want to struggle with it longer so I can learn more.

jjjousun added 30 commits April 10, 2017 16:34
@kariabancroft
Copy link
Copy Markdown

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Looks good - though you don't want to check in those .ds_store files
Comprehension questions Yes
General
Rails fundamentals (RESTful routing, use of named paths) Yes
Semantic HTML Yes - In most cases. Once you get further down into the show pages and forms you don't utilize semantic HTML as often, so be aware of adding this in these scenarios.
Errors are reported to the user Yes - I'd use a more meaningful CSS class name other than "flash" to describe the purpose of this error section
Business logic lives in the models Not much - but there is a method to check that a vote isn't already created
Model testing Yes a bunch - note that when you are checking that a model object is valid, you still want to add the must_equal to the end because otherwise it's not going to assert anything and if it is false instead of true, it will still continue on as normal.
Controller testing Mostly stubbed out which is better than nothing - looking forward to seeing your work on these in the bEtsy project
Wave 1 - Media
Splash page shows the three media categories Yes - Though there is too much logic in the views. For ex, looking at the index view, each media type should be selected in the controller from a model method which will retrieve each type. The sampled media type should also not be determined within the view.
Basic CRUD operations on media are present and functional Yes
Wave 2 - Users and Votes
Users can log in and log out Yes
The ID of the current user is stored in the session Yes
Individual user pages and the user list are present Yes
A user cannot vote for the same media more than once Yes - does restrict the user from voting more than once
All media lists are ordered by vote count No - doesn't seem like the lists are ordered by votes
Splash page contains a media spotlight Yes
Media pages contain lists of voting users Yes
Wave 3 - Styling
Foundation is used appropriately Yes, briefly - would like to see you work with the grid layout more in bEtsy
Look and feel is similar to the original Pretty close
Overall The media ranker controller seems a bit odd. In the future, you could add a "home" or "welcome" controller which would allow to create a similar functionality to what you did for that main page. Overall, you seemed to get good practice with the whole rails request cycle and using some routes with a nested category parameter within. I'm looking forward to seeing some more testing in bEtsy as well as some more practice using the foundation grids.

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.

3 participants