-
Notifications
You must be signed in to change notification settings - Fork 42
Emilce - MediaRanker - Octos #27
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?