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

Carets- Julia Meier #37

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

Carets- Julia Meier #37

wants to merge 33 commits into from

Conversation

julmeier
Copy link

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I made a custom method to calculate the total votes for a specific work by iterating through the Work and Vote models. I later realize that Rails already setup relationships between objects so I didn't need to write a custom method because the code boiled down to work.votes.
Describe how you approached testing that model method. What edge cases did you come up with? I didn't ultimately need to test that model method.
Describe an edge case test you wrote for a controller
What are session and flash? What is the difference between them? Session holds data until the user logs out. Flash holds data and displays it until the url changes.
Describe a controller filter you wrote. I used a filter in my works_controller to create an instance variable of the work model for a given work id before specific methods.
What was one thing that you gained more clarity on through this assignment? The magic that rails has. Once you create relationships in the models (ex. has_many), it sets up relationships between the objects that really DRYs up the code and removes the need to create associations.
What is the Heroku URL of your deployed application https://media-ranker-biter.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? More detailed explanation of how to implement the session logic.

…dd a new piece of media and it shows it on the works#index page
…it and new page in the works#show page. Successfully edited a work and it saved to the main list
…tly shows top 10 media by category and votes
… testing, nor create table. will need to go back to this
… and methods, and views. manually tested and was able to login and have new user name saved to User model
…nstead added a clause to the work model validation called dependent which fided issue and passed WorksController::show test 3
…lay for votes#index to review all votes. tried to find a way to display the work titles in addition to it's id
@CheezItMan
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good messages
Comprehension questions Check, flash holds a message for one request cycle.
General
Rails fundamentals (RESTful routing, use of named paths) Why get 'works/home', to: 'works#home', as: 'home'.
Semantic HTML You should use more semantic HTML tags, less unenclosed ul elements and div elements.
Errors are reported to the user Yes, but they need styling
Business logic lives in the models Some things like spotlight media.
Models are thoroughly tested, including relations, validations and any custom logic Some testing on Votes and works. You're still working on testing relationships. Vote is mostly incomplete.
Controllers are thoroughly tested You've got some testing on WorksController, otherwise it's a work in progress
Wave 1 - Media
Splash page shows the three media categories Check
Basic CRUD operations on media are present and functional Upvote in't working, delete, create, index, how and update do work.
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 Chris
A user cannot vote for the same media more than once Can't vote once!
All media lists are ordered by vote count It seems to be ordering by title instead.
Splash page contains a media spotlight Nope!
Media pages contain lists of voting users Check
Wave 3 - Styling
Foundation is used appropriately Foundation is in the Rails project, but barely used.
Look and feel is similar to the original Nope
Overall Lots of stuff not finished here. I suggest working on testing and relationships as well as business logic in models in the bEtsy project. That will help you solidify your knowledge of what we've covered.

<!-- <div>session.inspect<%=session.inspect%></div> -->
<div>Params[session]<%=%></div>
<div>Session[user_id]<%=session[:user_id]%></div>
<strong><h2><%= link_to("Media Ranker", home_path, alt:'homepage')%></h2></strong>

Choose a reason for hiding this comment

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

Maybe root_path instead of home_path


describe "validations" do
it "is not valid without a title and author" do
work.valid?.must_equal false

Choose a reason for hiding this comment

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

You would need something to verify that the title & author both caused the validations to fail

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