aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal.rb')
-rw-r--r--actionpack/lib/action_controller/metal.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb
index e9007d3631..60b3f9a89b 100644
--- a/actionpack/lib/action_controller/metal.rb
+++ b/actionpack/lib/action_controller/metal.rb
@@ -49,7 +49,7 @@ module ActionController
# and response object available. You might wish to control the
# environment and response manually for performance reasons.
- attr_internal :status, :headers, :content_type, :app, :response
+ attr_internal :status, :headers, :content_type, :response
def initialize(*)
@_headers = {}
@@ -69,7 +69,7 @@ module ActionController
end
# :api: private
- def call(name, env)
+ def dispatch(name, env)
@_env = env
process(name)
to_a
@@ -95,7 +95,7 @@ module ActionController
end
def call(env)
- controller = @controller.new.call(@action, env)
+ @controller.new.dispatch(@action, env)
end
end
@@ -109,6 +109,10 @@ module ActionController
middleware_stack
end
+ def self.call(env)
+ action(env['action_dispatch.request.path_parameters'][:action]).call(env)
+ end
+
# Return a rack endpoint for the given action. Memoize the endpoint, so
# multiple calls into MyController.action will return the same object
# for the same action.