Skip to content

Jan Edrozo | Carets#34

Open
JNEdrozo wants to merge 46 commits intoAda-C8:masterfrom
JNEdrozo:master
Open

Jan Edrozo | Carets#34
JNEdrozo wants to merge 46 commits intoAda-C8:masterfrom
JNEdrozo:master

Conversation

@JNEdrozo
Copy link

@JNEdrozo JNEdrozo commented Oct 16, 2017

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. One of the custom methods in the work model was the self.filter_by_category. This method uses the AR query method, where, to retrieve objects from the database specified by the parameter, category. When called, it returns a collection(an array) of the instances that have the specified category.
Describe how you approached testing that model method. What edge cases did you come up with? I was unable to write a test for the filter_by_category method, but I will reattempt to write tests during or after betsy.
Describe an edge case test you wrote for a controller In users_controller_test.rb, an edge case I tested was for user pages that no longer exist.
What are session and flash? What is the difference between them? The Rails (not Rack) session object is a hash-like object that allows you to persist Ruby objects between HTTP requests without necessarily using the database. One example of data you may want to persist in the session is the id of the current user. The Rails flash object behaves in exactly the same way as the session object, except that its data is persisted for only one request. That way, an HTTP request that processes a payment, for example, can save a message such as "Your payment was successful" to be displayed after it redirects. https://www.quora.com/What-is-the-difference-between-flash-and-session-in-Ruby-on-Rails
Describe a controller filter you wrote. I was unable to implement any controller filters.
What was one thing that you gained more clarity on through this assignment? Working with rails AR Query interface through the rails console (using methods like where)
What is the Heroku URL of your deployed application Was unable to deploy to Heroku
Do you have any recommendations on how we could improve this project for the next cohort? More time and examples spent on testing

@CheezItMan
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and commit messages.
Comprehension questions Check, I'd look at the MediaRankerOAuth project for good examples of tests and use the examples to write your own.
General
Rails fundamentals (RESTful routing, use of named paths) Good RESTful routes
Semantic HTML Good Semantic HTML
Errors are reported to the user No use of flash notices!
Business logic lives in the models Good examples of business logic in the Models, these are very well done.
Models are thoroughly tested, including relations, validations and any custom logic You're missing a lot of tests in the Users Model test. Only one test for Work. No test for Vote.
Controllers are thoroughly tested You only have positive tests and no tests for the VotesController
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 No, a user can vote for a Work as many times as he/she wants.
All media lists are ordered by vote count Well done
Splash page contains a media spotlight Yes, but the spotlighted Media isn't linked to the work.
Media pages contain lists of voting users Check
Wave 3 - Styling
Foundation is used appropriately Pretty good work, nice responsiveness.
Look and feel is similar to the original Well done.
Overall There's some good work here. You're having trouble with testing especially with the Models. You also didn't have a validation preventing users from voting twice on the same work. Check scope to build that validation.

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