What is the process for creating a controller for the subject? What is its role?
Use the following command for creating a controller:
C:\ruby\library> ruby script/generate controller subject
The Rails controller is the center of the application that facilitates the interaction between users, views, and model. It also routes external requests to internal actions and handles URL. It also regulates helper modules and sessions.