Class: ActionController::Middleware
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActionController::Metal
|
Defined in: | actionpack/lib/action_controller/middleware.rb |
Class Attribute Summary
Metal - Inherited
::AbstractController::Base - Inherited
.abstract? | Alias for AbstractController::Base.abstract. |
.supports_path? | Returns true if the given controller is capable of rendering a path. |
Class Method Summary
-
.build
Alias for Metal.new.
- .new(app) ⇒ Middleware constructor
Metal - Inherited
.action | Returns a ::Rack endpoint for the given action name. |
.call | Makes the controller a ::Rack endpoint that runs the action in the given |
.controller_name | Returns the last part of the controller's name, underscored, without the ending |
.middleware | Alias for |
.new, | |
.use | Pushes the given ::Rack middleware and its arguments to the bottom of the middleware stack. |
::AbstractController::Base - Inherited
.abstract, | |
.abstract! | Define a controller as abstract. |
.action_methods | A list of method names that should be considered actions. |
.clear_action_methods! | action_methods are cached and there is sometimes need to refresh them. |
.controller_path | Returns the full controller name, underscored, without the ending Controller. |
.hidden_actions | The list of hidden actions. |
.internal_methods | A list of all internal methods for a controller. |
.method_added | Refresh the cached action_methods when a new action_method is added. |
::ActiveSupport::DescendantsTracker - Extended
Instance Attribute Summary
- #app rw
Metal - Inherited
#content_type, | |
#content_type= | Basic implementations for content_type=, location=, and headers are provided to reduce the dependency on the RackDelegation module in Renderer and Redirector. |
#env, #env=, | |
#headers | The details below can be overridden to support a specific Request and Response object. |
#location, #location=, #middleware_stack, #middleware_stack?, #params, #params=, | |
#performed? | Tests if render or redirect has already happened. |
#request | The details below can be overridden to support a specific Request and Response object. |
#response | The details below can be overridden to support a specific Request and Response object. |
#response_body=, #session, #status, #status= |
::AbstractController::Base - Inherited
Instance Method Summary
- #index
- #initialize(app) ⇒ Middleware constructor
- #process(action)
Metal - Inherited
#controller_name | Delegates to the class' |
#url_for | Basic url_for that can be overridden for more robust functionality. |
::AbstractController::Base - Inherited
#action_methods | Delegates to the class' |
#available_action? | Returns true if a method for the action is available and can be dispatched, false otherwise. |
#controller_path | Delegates to the class' |
#process | Calls the action going through the entire action dispatch stack. |
::ActiveSupport::Configurable - Included
#config | Reads and writes attributes from a configuration |
Constructor Details
.new(app) ⇒ Middleware
# File 'actionpack/lib/action_controller/middleware.rb', line 17
def new(app) ActionMiddleware.new(self, app) end
#initialize(app) ⇒ Middleware
Class Method Details
.build
Alias for Metal.new.
# File 'actionpack/lib/action_controller/middleware.rb', line 15
alias build new
Instance Attribute Details
#app (rw)
[ GitHub ]# File 'actionpack/lib/action_controller/middleware.rb', line 22
attr_internal :app
Instance Method Details
#index
[ GitHub ]# File 'actionpack/lib/action_controller/middleware.rb', line 35
def index call(env) end
#process(action)
[ GitHub ]# File 'actionpack/lib/action_controller/middleware.rb', line 24
def process(action) response = super self.status, self.headers, self.response_body = response if response.is_a?(Array) response end