Hayden - Edges / C10 - Bro Ranker#28
Conversation
… enable media deletion, add routes for PagesController
…into different tables by category
…s_controller routing
Media RankerWhat We're Looking For
Nicely done, Hayden! The code looks great, efficient, well-organized, and the site looks good too. My comments are mostly small suggestions and questions. I'm really impressed by how thorough and readable your tests are! They're great. Overall, good work! |
| return sorted.reverse! | ||
| end | ||
|
|
||
| def parse_bro_category(category) |
| self.all.max_by do |medium| | ||
| medium.votes.length | ||
| end | ||
| end |
There was a problem hiding this comment.
Fantastic! This is a great implementation of spotlight.
| <section class="media-table"> | ||
| <h4>Visual Bros</h4> | ||
| <%= render partial: "media_table", locals: { collection: order_by_votes(@movies) } %> | ||
| </section> |
There was a problem hiding this comment.
This view is already very clean code, as you made a good choice to pull out the media_table, but you could definitely find a way to push this so it's even shorter and cleaner ;)
| <ul class="list-group top-ten__list"> | ||
| <%= render partial: 'medium', collection: first_ten_by_votes(@albums) %> | ||
| </ul> | ||
| </section> |
There was a problem hiding this comment.
There's a similar comment for another bit of view code, but there's definitely another way to reduce this code... Just a suggestion though.
| <article> | ||
| <h4>Bro, lemme be honest w you...</h4> | ||
| <p> | ||
| We literally have no idea how the internet works. We scraped most of the code for this app from StackOverflow posts, and I have actually used the same password for every single website I've logged into since 1998. Besides, the government doesn't even need to brute force your hashes, they INVENTED the encryption algorithms. You really think they wouldn't put a backdoor in there? Tor was invented by the Navy, lol. |
| category: 'book', | ||
| creator: 'Jarth Dengees', | ||
| publication_year: 1999 | ||
| ) |
There was a problem hiding this comment.
Why not use an existing medium saved in the fixtures? (I definitely think that this is very readable though, so I won't fight for this very terribly, but the fixtures are definitely there already.)
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
sessionandflash? What is the difference between them?