Skip to content

Heather Herrington project submission - #57

Open
heatherherrington wants to merge 28 commits into
Ada-C6:b/hlh/masterfrom
heatherherrington:b/hlh/master
Open

Heather Herrington project submission#57
heatherherrington wants to merge 28 commits into
Ada-C6:b/hlh/masterfrom
heatherherrington:b/hlh/master

Conversation

@heatherherrington

Copy link
Copy Markdown

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants