Ruby on Rails Controller

The Rails controller is the logical center of your application. It coordinates the interaction between the user, the views, and the model. The controller is also a home to a number of important ancillary services.

  • It is responsible for routing external requests to internal actions. It handles people-friendly URLs extremely well.

  • It manages caching, which can give applications orders-of-magnitude performance boosts.

  • It manages helper modules, which extend the capabilities of the view templates without bulking up their code.

  • It manages sessions, giving users the impression of an ongoing interaction with our applications.

  • The process for creating a controller is very easy, and it's similar to the process we've already used for creating a model. We will create just one controller here ??
    library\> rails generate controller Book

    © copyright 2017-2022 Completedone pvt ltd.