March 2025
Intermediate to advanced
472 pages
12h 10m
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 tailwindcss |
| | 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 |
As in the previous chapter, where we used the generate utility to create a controller and associated scaffolding to administer ...
Read now
Unlock full access