Class: ActionController::Middleware::ActionMiddleware
- Inherits:
-
Object
- Object
- ActionController::Middleware::ActionMiddleware
- Defined in:
- lib/action_controller/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(controller, app) ⇒ ActionMiddleware
constructor
A new instance of ActionMiddleware.
Constructor Details
#initialize(controller, app) ⇒ ActionMiddleware
Returns a new instance of ActionMiddleware.
4 5 6 |
# File 'lib/action_controller/middleware.rb', line 4 def initialize(controller, app) @controller, @app = controller, app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/action_controller/middleware.rb', line 8 def call(env) request = ActionDispatch::Request.new(env) @controller.build(@app).dispatch(:index, request) end |