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.rb26
1 files changed, 8 insertions, 18 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb
index 60b3f9a89b..1819c0f886 100644
--- a/actionpack/lib/action_controller/metal.rb
+++ b/actionpack/lib/action_controller/metal.rb
@@ -28,24 +28,9 @@ module ActionController
self.class.controller_name
end
- # Returns the full controller name, underscored, without the ending Controller.
- # For instance, MyApp::MyPostsController would return "my_app/my_posts" for
- # controller_name.
- #
- # ==== Returns
- # String
- def self.controller_path
- @controller_path ||= name && name.sub(/Controller$/, '').underscore
- end
-
- # Delegates to the class' #controller_path
- def controller_path
- self.class.controller_path
- end
-
# The details below can be overridden to support a specific
# Request and Response object. The default ActionController::Base
- # implementation includes RackConvenience, which makes a request
+ # implementation includes RackDelegation, which makes a request
# and response object available. You might wish to control the
# environment and response manually for performance reasons.
@@ -57,7 +42,7 @@ module ActionController
end
# Basic implementations for content_type=, location=, and headers are
- # provided to reduce the dependency on the RackConvenience module
+ # provided to reduce the dependency on the RackDelegation module
# in Renderer and Redirector.
def content_type=(type)
@@ -68,6 +53,10 @@ module ActionController
headers["Location"] = url
end
+ def status=(status)
+ @_status = Rack::Utils.status_code(status)
+ end
+
# :api: private
def dispatch(name, env)
@_env = env
@@ -81,7 +70,7 @@ module ActionController
end
class ActionEndpoint
- @@endpoints = Hash.new {|h,k| h[k] = Hash.new {|h,k| h[k] = {} } }
+ @@endpoints = Hash.new {|h,k| h[k] = Hash.new {|sh,sk| sh[sk] = {} } }
def self.for(controller, action, stack)
@@endpoints[controller][action][stack] ||= begin
@@ -92,6 +81,7 @@ module ActionController
def initialize(controller, action)
@controller, @action = controller, action
+ @_formats = [Mime::HTML]
end
def call(env)