When a user visits the new paper page
Then the page should render
Hints
A paper management system manages papers in addition to authors.
Papers should have a 'title' and a 'venue' string as well as a 'year' integer, indicating publishing date.
Papers should be manageable by users using views similar to authors.
Instead of generating the paper model and all the needed controllers and views separately (for new, create, read, update, etc.), use a Rails scaffold.
It generates a model, a database migration, controller and views, and a basic suite:
rails generate scaffold paper title:string venue:string year:integer
Take a look at the generated files and adapt the tests.
The new migrations need to be applied: rails db:migrate RAILS_ENV=development && rails db:migrate RAILS_ENV=test
Error
Got NameError: undefined local variable or method `new_paper_path' for #
Did you mean? new_author_path
19 exercise tests have passed. There are 44 in total. You will solve multiple at once towards the end.
Scenario
When a user visits the new paper page Then the page should render
Hints
A paper management system manages papers in addition to authors. Papers should have a 'title' and a 'venue' string as well as a 'year' integer, indicating publishing date. Papers should be manageable by users using views similar to authors.
Instead of generating the paper model and all the needed controllers and views separately (for new, create, read, update, etc.), use a Rails
scaffold
. It generates a model, a database migration, controller and views, and a basic suite:rails generate scaffold paper title:string venue:string year:integer
Take a look at the generated files and adapt the tests.The new migrations need to be applied:
rails db:migrate RAILS_ENV=development && rails db:migrate RAILS_ENV=test
Error
19 exercise tests have passed. There are 44 in total. You will solve multiple at once towards the end.