提交 52798fd4 编写于 作者: Y Yehuda Katz

rename ActionController::Http to ActionController::Metal at Josh's suggestion

上级 af375a5e
...@@ -45,11 +45,9 @@ def index ...@@ -45,11 +45,9 @@ def index
OK = [200, {}, []] OK = [200, {}, []]
MetalPostController = lambda { OK } MetalPostController = lambda { OK }
if ActionController.const_defined?(:Http) class HttpPostController < ActionController::Metal
class HttpPostController < ActionController::Http def index
def index self.response_body = ''
self.response_body = ''
end
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require "action_controller" require "action_controller"
class Kaigi < ActionController::Http class Kaigi < ActionController::Metal
include AbstractController::Callbacks include AbstractController::Callbacks
include ActionController::RackConvenience include ActionController::RackConvenience
include ActionController::Renderer include ActionController::Renderer
......
...@@ -2,7 +2,7 @@ module ActionController ...@@ -2,7 +2,7 @@ module ActionController
autoload :Base, "action_controller/base/base" autoload :Base, "action_controller/base/base"
autoload :ConditionalGet, "action_controller/base/conditional_get" autoload :ConditionalGet, "action_controller/base/conditional_get"
autoload :HideActions, "action_controller/base/hide_actions" autoload :HideActions, "action_controller/base/hide_actions"
autoload :Http, "action_controller/base/http" autoload :Metal, "action_controller/base/metal"
autoload :Layouts, "action_controller/base/layouts" autoload :Layouts, "action_controller/base/layouts"
autoload :RackConvenience, "action_controller/base/rack_convenience" autoload :RackConvenience, "action_controller/base/rack_convenience"
autoload :Rails2Compatibility, "action_controller/base/compatibility" autoload :Rails2Compatibility, "action_controller/base/compatibility"
......
...@@ -30,7 +30,7 @@ def descendants ...@@ -30,7 +30,7 @@ def descendants
# instance methods on that abstract class. Public instance methods of # instance methods on that abstract class. Public instance methods of
# a controller would normally be considered action methods, so we # a controller would normally be considered action methods, so we
# are removing those methods on classes declared as abstract # are removing those methods on classes declared as abstract
# (ActionController::Http and ActionController::Base are defined # (ActionController::Metal and ActionController::Base are defined
# as abstract) # as abstract)
def internal_methods def internal_methods
controller = self controller = self
......
module ActionController module ActionController
class Base < Http class Base < Metal
abstract! abstract!
include AbstractController::Benchmarker include AbstractController::Benchmarker
......
require 'action_controller/abstract' require 'action_controller/abstract'
module ActionController module ActionController
# ActionController::Http provides a way to get a valid Rack application from a controller. # ActionController::Metal provides a way to get a valid Rack application from a controller.
# #
# In AbstractController, dispatching is triggered directly by calling #process on a new controller. # In AbstractController, dispatching is triggered directly by calling #process on a new controller.
# ActionController::Http provides an #action method that returns a valid Rack application for a # ActionController::Metal provides an #action method that returns a valid Rack application for a
# given action. Other rack builders, such as Rack::Builder, Rack::URLMap, and the Rails router, # given action. Other rack builders, such as Rack::Builder, Rack::URLMap, and the Rails router,
# can dispatch directly to the action returned by FooController.action(:index). # can dispatch directly to the action returned by FooController.action(:index).
class Http < AbstractController::Base class Metal < AbstractController::Base
abstract! abstract!
# :api: public # :api: public
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册