swt2-intro-exercise / rails-exercise-20-felixauringer

rails-exercise-20-felixauringer created by GitHub Classroom
MIT License
0 stars 0 forks source link

Paper index page should allow filtering papers by year #16

Closed swt2public closed 3 years ago

swt2public commented 3 years ago

Scenario

Given a paper published in 1950 And a paper published in 1968 When users visit the papers index page with url parameter year=1950 Then it should not show the paper published in 1968

Hints

Almost done with the exercise!

A long list of papers can be hard to search. Allow filtering the list of papers on the paper index page (by year) with an URL parameter, e.g. http://localhost:3000/papers?year=1970. You can use scopes to implement this behavior in the Paper model and adapt the PapersController's index action to take params[:year] into account. Consider the subheadings Passing in arguments and Using conditionals of the Rails guide.

Error

Expected not to find text "go to statement considered harmful" in "papers\ntitle venue year computing machinery and intelligence mind 49: 433-460 1950 show edit destroy go to statement considered harmful communications of the acm 1968 show edit destroy\nnew paper"

43/44 exercise tests have passed

felixauringer commented 3 years ago

Fixed in 074d6b0f3c3b16b2af6a5ed01659234fe876a241