Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
52798fd4
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
52798fd4
编写于
8月 06, 2009
作者:
Y
Yehuda Katz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename ActionController::Http to ActionController::Metal at Josh's suggestion
上级
af375a5e
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
10 addition
and
12 deletion
+10
-12
actionpack/examples/minimal.rb
actionpack/examples/minimal.rb
+3
-5
actionpack/examples/very_simple.rb
actionpack/examples/very_simple.rb
+1
-1
actionpack/lib/action_controller.rb
actionpack/lib/action_controller.rb
+1
-1
actionpack/lib/action_controller/abstract/base.rb
actionpack/lib/action_controller/abstract/base.rb
+1
-1
actionpack/lib/action_controller/base/base.rb
actionpack/lib/action_controller/base/base.rb
+1
-1
actionpack/lib/action_controller/base/metal.rb
actionpack/lib/action_controller/base/metal.rb
+3
-3
未找到文件。
actionpack/examples/minimal.rb
浏览文件 @
52798fd4
...
...
@@ -45,12 +45,10 @@ def index
OK
=
[
200
,
{},
[]]
MetalPostController
=
lambda
{
OK
}
if
ActionController
.
const_defined?
(
:Http
)
class
HttpPostController
<
ActionController
::
Http
class
HttpPostController
<
ActionController
::
Metal
def
index
self
.
response_body
=
''
end
end
end
Runner
.
run
(
MetalPostController
,
N
,
'metal'
)
...
...
actionpack/examples/very_simple.rb
浏览文件 @
52798fd4
...
...
@@ -3,7 +3,7 @@
require
"action_controller"
class
Kaigi
<
ActionController
::
Http
class
Kaigi
<
ActionController
::
Metal
include
AbstractController
::
Callbacks
include
ActionController
::
RackConvenience
include
ActionController
::
Renderer
...
...
actionpack/lib/action_controller.rb
浏览文件 @
52798fd4
...
...
@@ -2,7 +2,7 @@ module ActionController
autoload
:Base
,
"action_controller/base/base"
autoload
:ConditionalGet
,
"action_controller/base/conditional_get"
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
:RackConvenience
,
"action_controller/base/rack_convenience"
autoload
:Rails2Compatibility
,
"action_controller/base/compatibility"
...
...
actionpack/lib/action_controller/abstract/base.rb
浏览文件 @
52798fd4
...
...
@@ -30,7 +30,7 @@ def descendants
# instance methods on that abstract class. Public instance methods of
# a controller would normally be considered action methods, so we
# 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)
def
internal_methods
controller
=
self
...
...
actionpack/lib/action_controller/base/base.rb
浏览文件 @
52798fd4
module
ActionController
class
Base
<
Http
class
Base
<
Metal
abstract!
include
AbstractController
::
Benchmarker
...
...
actionpack/lib/action_controller/base/
http
.rb
→
actionpack/lib/action_controller/base/
metal
.rb
浏览文件 @
52798fd4
require
'action_controller/abstract'
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.
# 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,
# can dispatch directly to the action returned by FooController.action(:index).
class
Http
<
AbstractController
::
Base
class
Metal
<
AbstractController
::
Base
abstract!
# :api: public
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录