Iteration C1: Creating the Catalog Listing
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 coffee |
| create app/assets/javascripts/store.coffee |
| invoke scss |
| create app/assets/stylesheets/store.scss ... |
Get Agile Web Development with Rails 5, 1st Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.