Class | ActionController::Metal |
In: |
lib/action_controller/metal.rb
|
Parent: | AbstractController::Base |
ActionController::Metal provides a way to get a valid Rack application from a controller.
In AbstractController, dispatching is triggered directly by calling process on a new controller. ActionController::Metal provides an action method that returns a valid Rack application for a given action. Other rack builders, such as Rack::Builder, Rack::URLMap, and the Rails router, can dispatch directly to the action returned by FooController.action(:index).
Returns the last part of the controller‘s name, underscored, without the ending "Controller". For instance, MyApp::MyPostsController would return "my_posts" for controller_name
String
Basic implementations for content_type=, location=, and headers are provided to reduce the dependency on the RackDelegation module in Renderer and Redirector.