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

Tanja Stroble -- Media Ranker ^Carets^ #28

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

Conversation

misstonbon
Copy link

@misstonbon misstonbon 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 spotlight method. It is a class method that returns a highest rated work
Describe how you approached testing that model method. What edge cases did you come up with? I am afraid I didn't test this. I only tested the validations, but I did make several user accounts on the site itself and upvoted one particular work and saw that the spotlight section updated accordingly.
Describe an edge case test you wrote for a controller I wrote an edge case where the controller still renders an index page even if there is no data - deleted all works and it still responds with success.
What are session and flash? What is the difference between them? Sessions is a hash that allows persistent state until user logs out where the flash is a hash that only persists until request is resubmitted.
Describe a controller filter you wrote. before_action :find_by_id, only: [:show, :edit, :update, :destroy] for works controller. Finds user id before any of the above mentioned actions.
What was one thing that you gained more clarity on through this assignment? counter cache! I was researching a good way to count votes and after some time, I figured out how to implement this although I still understand it only in the scope of the app I made, I don't yet know it's other applications.
What is the Heroku URL of your deployed application https://tanja-ranker.herokuapp.com
Do you have any recommendations on how we could improve this project for the next cohort? Would make this a pair project. Rideshare was much more manageable and one person could have done it in the time allowed quite comfortably, while this app introduced concepts I feel take some time to sink in, and it would have been good to have had more features added to it like downvoting or oauth but have two people work on it as a strictly pair programming effort.

@tildeee
Copy link

tildeee commented Oct 18, 2017

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x
General
Rails fundamentals (RESTful routing, use of named paths) x
Semantic HTML x
Errors are reported to the user no error showing on invalid form submission for new work, otherwise errors do show up as expected
Business logic lives in the models x
Models are thoroughly tested, including relations, validations and any custom logic x
Controllers are thoroughly tested x
Wave 1 - Media
Splash page shows the three media categories x
Basic CRUD operations on media are present and functional x
Wave 2 - Users and Votes
Users can log in and log out x
The ID of the current user is stored in the session x
Individual user pages and the user list are present x
A user cannot vote for the same media more than once x
All media lists are ordered by vote count x
Splash page contains a media spotlight x
Media pages contain lists of voting users missing
Wave 3 - Styling
Foundation is used appropriately loaded correctly, minimal use of it in this project
Look and feel is similar to the original x
Overall

@tildeee
Copy link

tildeee commented Oct 18, 2017

Overall, I think you did a good job with the project and a GREAT job with testing! I'm so proud of you!

The overall functionality is great, you caught a lot of really good edge cases like blank name on the login form and if @spotlight may be nil on the splash page.

@@ -0,0 +1,21 @@
class Work < ApplicationRecord

CATEGORIES = ["album", "book", "movie"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am SO glad you made a CATEGORIES constant, I wish more people did this :)

def index
@works_by_category = {}
Work::CATEGORIES.each do |cat|
@works_by_category[cat] = Work.where(category: cat)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever!

@tildeee
Copy link

tildeee commented Oct 18, 2017

also, ✨ gogol bordello ✨

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