ActionController
ActionController is a core component of the Ruby on Rails web framework that provides the controller layer in the Model-View-Controller architecture. Controllers are implemented as classes that inherit from ActionController::Base (or from ActionController::API in API-only applications) and define public methods called actions. They receive HTTP requests, coordinate with models, and decide how to respond, typically by rendering a view or returning data in another format.
Key responsibilities include handling request parameters, managing session and flash data, and producing responses. ActionController supports
Security and parameter handling are supported via strong parameters, with methods such as params.require and params.permit
Variants include ActionController::Base for standard applications, ActionController::API for API-only apps that omit view-related features, and ActionController::Metal