February 2020
Intermediate to advanced
496 pages
12h 36m
English
We’ve already created the products controller, used by the seller to administer the Depot application. Now it’s time to create a second controller, one that interacts with the paying customers. Let’s call it Store:
| | depot> bin/rails generate controller Store index |
| | create app/controllers/store_controller.rb |
| | route get 'store/index' |
| | invoke erb |
| | create app/views/store |
| | create app/views/store/index.html.erb |
| | invoke test_unit |
| | create test/controllers/store_controller_test.rb |
| | invoke helper |
| | create app/helpers/store_helper.rb |
| | invoke test_unit |
| | invoke assets |
| | invoke scss |
| | create app/assets/stylesheets/store.scss |
As in the previous chapter, where we used the generate ...
Read now
Unlock full access