Class: ActionController::Middleware::ActionMiddleware
- Defined in:
- actionpack/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 'actionpack/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 'actionpack/lib/action_controller/middleware.rb', line 8 def call(env) request = ActionDispatch::Request.new(env) @controller.build(@app).dispatch(:index, request) end |