Heather Herrington project submission - #57
Open
heatherherrington wants to merge 28 commits into
Open
Conversation
… no titles are duplicates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Waves 1, 2, and 3 complete. Used Faker gem to generate faux data and .yml files for testing. Trello is here: https://trello.com/b/ATkSTmyX/media-ranker . Although not a requirement, deployed to Heroku for practice: https://heathermediaranker.herokuapp.com/
Originally wrote "top 10" on main page as a 10.times loop, but that threw an error if there were fewer than 10 items, so switched to .each_by_index. Used partials where I could - new/edit forms, main index page, etc. I suspect I could have combined all 3 media new/edit forms into one partial, but given that there was a director for movies, an artist for albums, and an author for books, it seemed easier to leave them separate.
Display errors for nil data in forms, as well as a custom error message if there is a new entry with the same name/director, name/author, name/artist. Just a duplicate name isn't enough, but if the name and creator are the same, it's the same item.
I also attempted to put the .vote method into a model rather than a controller, but I ended up having to write just as much code in the controller to call it from the model as I did just putting it in the controller, so I left it there. I'd like to go over this in a 1-on-1/code review.
Also, my buttons are pretty and I like my owl image better than the original one :)