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

Leaves - Cloudy #53

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

Leaves - Cloudy #53

wants to merge 21 commits into from

Conversation

OhCloud
Copy link

@OhCloud OhCloud commented Oct 25, 2019

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. i wrote a custom method for spotlight, where i get the work w the highest vote and grab the first one
Describe how you approached testing that model method. What edge cases did you come up with? i did the cases we have to test for validations, is it valid, not valid if that and what if there is a non unique version
What are session and flash? What is the difference between them? session grabs the session and flash is just a flash. one is a recorded meeting with notes for next time and the other someone running into the room w an announcement that only happens once in a while
What was one thing that you gained more clarity on through this assignment? ---------
What is the Heroku URL of your deployed application? https://mediarankerleavescloudy.herokuapp.com
Do you have any recommendations on how we could improve this project for the next cohort? more time.

…e homepages controller by adding index to it.
…ed 12 various works so i can ensure the top ten will work
…. created custom method for top ten and spotlight.
root 'works#index'

resources :works
resources :homepages

Choose a reason for hiding this comment

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

This is unnecessary. You don't use the majority of these routes.

Comment on lines +14 to +22
<h3>MOVIES</h3>
<ul>
<% movies = Work.topten(category: "movie") %>
<% movies.each do |movie| %>
<li>
<%= link_to movie.title, work_path(movie.id) %>
</li>
</ul>
<% end %>

Choose a reason for hiding this comment

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

This code is repeated, you can use a view partial to DRY this up.

expect(book.save).must_equal false
end
end

Choose a reason for hiding this comment

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

you need tests for your model methods.


<p><%= @work.description%></p>
<p><%= link_to "Back to Media Ranks", works_path %></p>
<p><%= link_to "Edit", works_path %></p>

Choose a reason for hiding this comment

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

this is the wrong path. it should be edit_works_path. You can get that information using rails routes in the terminal

Comment on lines +8 to +12
<p><%= @work.description%></p>
<p><%= link_to "Back to Media Ranks", works_path %></p>
<p><%= link_to "Edit", works_path %></p>
<p><%= link_to "Upvote", vote_path(@work.id), method: :post %></p>
<p><%= link_to "Delete", work_path(@work.id), method: :delete, data: {confirm: "Are you sure?"}%></p>

Choose a reason for hiding this comment

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

Should this be a series of <p> tags or a <ul> with <li> tags?

@dHelmgren
Copy link

Media Ranker

What We're Looking For

Manual Testing

Workflow yes / no
Deployed to Heroku yes
Optional: Look and feel is similar to the original (consider styling and layout) no
Before logging in
On index page, there are at most 10 pieces of media on three lists, and a Media Spotlight yes
Can go into a work's show page yes
Verify unable to vote on a work, and get a flash message yes
Can edit this work successfully, and get a flash message no, incorrect link
Can go to "View all media" page and see three lists of works, sorted by vote yes
Verify unable to create a new work when the form is empty, and details about the validation errors are visible to the user through a flash message yes
Can create a new work successfully. Note the URL for this work's show page no, redirects to index rather than show page. Also, cannot create movies?
Can delete this work successfully yes
Going back to the URL of this deleted work's show page produces a 404 or some redirect behavior (and does not try to produce a broken view) It shows a broken view.
Verify that the "View all users" page lists no users (except what is produced by db seeding) yes
Log in
Logging in with a valid name changes the UI to "Logged in as" and "Logout" buttons yes
Your username is listed in "View all users" page yes
Verify that number of votes determines the Media Spotlight yes
Voting on several different pieces of media affects the "Votes" tables shown in the work's show page and the user's show page yes
Voting on the same work twice produces an error/flash message, and there is no extra vote yes
Log out
Logging out showed a flash message and changed the UI yes
Logging in as a new user creates a new user yes
Logging in as an already existing user has a specific flash message yes

Targeted Code Review

Area yes / no
git commits were small and atomic, with useful messages Mostly.
Routes file uses resources for works yes
Routes file shows intention in limiting routes for voting, log-in functionality, and users no
The homepage view, all media view, and new works view use semantic HTML no
The homepage view, all media view, and new works view use partials when appropriate no
The model for media (likely named work.rb) has_many votes yes
The model for media has methods to describe business logic, specifically for top ten and top media, possibly also for getting works by some category yes
Some controller, likely the ApplicationController, has a controller filter for finding a logged in user no
Some controller, likely the WorksController, has a controller filter for finding a work np
The WorksController uses strong params yes
The WorksController's code style is clean, and focused on working with requests, responses, params, session, flash yes

Targed Test Review

Area yes / no
There are valid fixtures files used for users, votes, and works yes
User model has tests with sections on validations (valid and invalid) and relationships (has votes) no tests on relationships
Vote model has tests with sections on validations (valid and invalid) and relationships (belongs to a user, belongs to a vote) no tests on relationships
Work model has tests with sections on validations (valid and invalid) and relationships (has votes) no tests on relationships
Work model has tests with a section on all business logic methods in the model, including their edge cases no

Overall Feedback

This project is clearly still in-progress. It looks like a lot of the features got implemented most of the way, but there are some pretty clear problems outlined above. In the future, please tell your instructors about projects like this. Our goal is to help bridge the gap between where y'all are and where we need y'all to be, and part of that is being able to communicate about your progress. Let's take a minute to talk later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants