Skip to content

Conversation

@emilcecarlisa
Copy link

@emilcecarlisa emilcecarlisa commented Apr 14, 2018

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I created a model named works that contains a lot of the main page functionality (i.e. top media)
Describe how you approached testing that model method. What edge cases did you come up with? I tried to write tests as I was coding, which slowed me down considerably but now I feel more comfortable with it. No edge cases.
What are session and flash? What is the difference between them? Session keeps track of data for later use, while flash is used to display a message. Both are hash like objects.
Describe a controller filter you wrote. I did not write one.
What was one thing that you gained more clarity on through this assignment? I have a better idea of how Active record works and the difference between join tables and model references.
What is the Heroku URL of your deployed application? https://hanky-ranky.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? More tutor support and daily reviews during the week of the project.

@kariabancroft
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good
Comprehension questions Yes
General
Rails fundamentals (RESTful routing, use of named paths) Yes - good
Semantic HTML Using some semantic HTML - although many views are a bit messy. Watch out for unused opening/closing tags as these can have unexpected behavior.
Errors are reported to the user Yes - using the model errors with a partial as well as some flash messages in the controllers
Business logic lives in the models Yes - definitely contains some especially in the Work
Models are thoroughly tested, including relations, validations and any custom logic Missing a lot of the core tests for models other than works, relationships, etc.
Wave 1 - Media
Splash page shows the three media categories Yes - appears to be working though voting doesn't work so its hard to say
Basic CRUD operations on media are present and functional No - Create work doesn't work - issue with the publication date. No way to edit the work or delete the work.
Wave 2 - Users and Votes
Users can log in and log out Looks like toggling the login/logout buttons are not working when it is a new user, but is working when it is an existing user.
The ID of the current user is stored in the session Yes
Individual user pages and the user list are present Yes
A user cannot vote for the same media more than once N/A - voting not implemented
All media lists are ordered by vote count N/A
Splash page contains a media spotlight Yes
Media pages contain lists of voting users N/A
Wave 3 - Styling
Foundation is used appropriately Yes - like columns for splash page
Look and feel is similar to the original Yes - similar!
Overall Overall, you missed some of the major learning goals of this assignment. At this point you should be able to complete the CRUD actions for a given resource (in this case Works) and I would've liked to see you practice more with testing the models, as this was a major learning goal.

root 'works#top_media'

resources :works
get '/', to: 'works#top_media', as: 'top_media'

Choose a reason for hiding this comment

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

This route is the same as the root route so you shouldn't need both. If you need the named route for this you can use root_path.

end

def self.top_albums
return top_albums = all_albums.limit(10)

Choose a reason for hiding this comment

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

Nice job using the existing methods and then adding the limit to simplify.

@@ -0,0 +1,27 @@
<h4>
<% page_title %>

Choose a reason for hiding this comment

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

Why would you have both a code tag and a display tag for this info?


<hr class="root-hr">

<body>

Choose a reason for hiding this comment

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

You should not havebody and main inside any of your views since they are already contained without the application.html.erb file and therefore already within all views

</h3>
</div>

</section>

Choose a reason for hiding this comment

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

Is this all leftover from something else?

describe 'validations' do
it 'has a title' do
book_title = @work.title
book_title.must_equal("The 4-Hour Chef")

Choose a reason for hiding this comment

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

Having a title isn't really testing the validation - we want to create it with a title and ensure that it is valid?, and then do the same for the inverse scenario (like you are doing below)

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