Emilce - MediaRanker - Octos#27
Conversation
…ks model and votes
Media RankerWhat We're Looking For
|
| root 'works#top_media' | ||
|
|
||
| resources :works | ||
| get '/', to: 'works#top_media', as: 'top_media' |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Nice job using the existing methods and then adding the limit to simplify.
| @@ -0,0 +1,27 @@ | |||
| <h4> | |||
| <% page_title %> | |||
There was a problem hiding this comment.
Why would you have both a code tag and a display tag for this info?
|
|
||
| <hr class="root-hr"> | ||
|
|
||
| <body> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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)
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
sessionandflash? What is the difference between them?