...

/

Creating the Catalog Listing

Creating the Catalog Listing

Learn to configure the routes in Ruby applications.

We’ve already created the products controller, which will be used by the seller to administer the Depot application. Now it’s time to create a second controller to interact with the paying customers. Let’s call it “Store:”

depot> bin/rails generate controller Store index

A live terminal

Try the above command in the terminal provided below

Terminal 1
Terminal
Loading...

In the previous chapter, we used the generate utility to create a controller and associated scaffolding to administer the products. Here we’ve asked it to create the StoreController class in the store_controller.rb file, which contains a single action method, index().

Everything is already set up for this action to be ...