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

Pipes - Angela - Media Ranker #32

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

Conversation

awilson2017
Copy link

@awilson2017 awilson2017 commented Oct 16, 2017

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. Work.spotlight takes all the works and finds the highest work based on highest vote count and returns that work object.
Describe how you approached testing that model method. What edge cases did you come up with? I only did nominal case because I saw in my notes that one test was the guideline for custom methods. My assumption was for nominal cases not edge. I am also not sure the tests I wrote will work as I have a bug and I get a syntax error before my tests will run. (time stamp Sun 9.45p) I plan on meeting with Dan in the morning to discuss the bug.
Describe an edge case test you wrote for a controller when the work create method does not save to the database. The user gets a bad_response and the test confirms this.
What are session and flash? What is the difference between them? session saves the users session data in a cookie and they are usually between user login and logout.
Describe a controller filter you wrote. before_action so the correct work or user is found before the controller action is started.
What was one thing that you gained more clarity on through this assignment? Nested loops became clearer. However, I am fuzzy on much more than in clear.
What is the Heroku URL of your deployed application https://rankmedia.herokuapp.com/
I had a problem with the command 'heroku run rails db:migrate' because it is looking for a migration called 'works' which I deleted because I made a model 'works'. Then to correct the error, i made a singular 'work' and the program would not work without deleting the 'works' migration.
Do you have any recommendations on how we could improve this project for the next cohort? hhhmmmm. I want to provide meaningful feedback so the next cohort will have a better experience and I am too fried for this kind of reflection. Off the top of my head more opportunities within lecture to apply the concept involved with Media Ranker, pictures explaining concepts eg Foundation stuff and the curriculum as a whole, more straight-out project time, and I am sure there is other feedback. From both a teacher perspective and a rational student perspective, this project was a coalescence of everything we learned in Rails plus testing and Foundation. So for that I am pleased. As for the work I produced, eh shoulder shrug.

…ave no routes. Now shifting to work on routes.
…ed correctly. So rails db:reset and now both user and votes are not seeding. Going to work on something different.
…ontroller.

apply this helper method as before_actio to show, edit, update, and destroy.
@PilgrimMemoirs
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Well Done
Comprehension questions Well Done
General
Rails fundamentals (RESTful routing, use of named paths) Needs improvement - routes need to be cleaned up, identify routes that are not being used and remove them. Are the nested works routes within users necessary? Is there an advantage to using them over just using the works routes? There also seems to be confusion on how to call a nested route when two params are necessary (see note on calling a nested route below)
Semantic HTML ❗️ Missing sectioning tags - most area where there related chunk of elements are lacking a sectioning tag wrapped around them, like <header>, <main>, <section>, etc.
Errors are reported to the user Some, but incomplete - Flashes for creating/editing new work. Nothing for logging in or voting
Business logic lives in the models ❗️ Mostly Good - Work spotlight and top_ten methods are appropriate, see note on Vote.user_votes_arary below
Models are thoroughly tested, including relations, validations and any custom logic Good Start, but incomplete - instead of result.must_be false, have result.must_equal false to prevent "NoMethodError: undefined method ..." errors.
Controllers are thoroughly tested ❗️ Good Start, but incomplete - Started Work controller, had right idea but some basic errors (a lot of misspelled words) are causing tests to fail. Did not complete destroy. See note on works controller below
Wave 1 - Media
Splash page shows the three media categories Mostly Good - Instead of calling methods like Work.spotlight and Work.top_ten("album") in the html.erb file, they should be called in the controller action and set to an instance variable. The instance variable is what should be used in the view file. Remember that the controller is the connector between the model/db to the view files. It's job it to call the necessary methods and pass them to the view to use.
Basic CRUD operations on media are present and functional Well Done
Wave 2 - Users and Votes
Users can log in and log out ❗️ Not Complete
The ID of the current user is stored in the session ❗️ Not Complete
Individual user pages and the user list are present ❗️ Not Complete
A user cannot vote for the same media more than once ❗️ Not Complete
All media lists are ordered by vote count Well Done
Splash page contains a media spotlight Well Done
Media pages contain lists of voting users Mostly good - see note below on Vote.user_votes_arary
Wave 3 - Styling
Foundation is used appropriately ❗️ Not Complete
Look and feel is similar to the original ❗️ Not Complete
Overall
Works Controller test line 68 causing error in test - 'NameError: uninitialized constant Book'. That line includes code calling Book.new. Does your application have a Book class? How do you create a new book with the way your application is setup? What class do you actually call in order to create a new record for a book? Answer: Work.new with it's category attribute set to 'book'.
Calling a nested route & where to test controller methods - Works Controller test "returns a success status when given a valid user_id", line 22 There's a few things that need to be addressed in order to have this test work - Controller testwork_user_path is expecting two arguments passed to it (work_id and id, for a user), a work id and user id. This route is pointing to a method in the users controller, "users#show", as I found out when I ran 'rake routes'. That means this should be tested in the users controller.
Method Vote.user_votes_arary one, be aware of spelling. Two, this method is not needed. Instead you can call .votes on a user instance to find all the votes of a specific user, like so User.find_by(id: 1).votes
A significant part of wave 2 and all of Wave 3 functionality missing ❗️ This is the most concerning part.
Submission is not complete and does not meet project expectations. Most concerning areas: setting up login, using session, restricting functionality to logged-in users, testing, using foundation for layout, setting up routes and understanding how they connect to controller methods. Understanding of these areas needs to be demonstrated, by revisiting this project and working on them in 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