-
Notifications
You must be signed in to change notification settings - Fork 48
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
Hayden - Edges / C10 - Bro Ranker #28
base: master
Are you sure you want to change the base?
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice use of view helpers!
self.all.max_by do |medium| | ||
medium.votes.length | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... 🔥
category: 'book', | ||
creator: 'Jarth Dengees', | ||
publication_year: 1999 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
session
andflash
? What is the difference between them?