Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
2f326b7f
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,体验更适合开发者的 AI 搜索 >>
提交
2f326b7f
编写于
9月 27, 2010
作者:
E
Emilio Tagua
提交者:
Santiago Pastorino
9月 27, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove warning "URI.unescape is obsolete" from actionpack.
Signed-off-by:
N
Santiago Pastorino
<
santiago@wyeworks.com
>
上级
8be911c6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
13 deletion
+16
-13
actionpack/lib/action_controller.rb
actionpack/lib/action_controller.rb
+1
-0
actionpack/lib/action_controller/caching/actions.rb
actionpack/lib/action_controller/caching/actions.rb
+2
-4
actionpack/lib/action_controller/caching/pages.rb
actionpack/lib/action_controller/caching/pages.rb
+2
-1
actionpack/lib/action_controller/test_case.rb
actionpack/lib/action_controller/test_case.rb
+0
-4
actionpack/lib/action_controller/uri_parser.rb
actionpack/lib/action_controller/uri_parser.rb
+9
-0
actionpack/lib/action_dispatch/routing/route_set.rb
actionpack/lib/action_dispatch/routing/route_set.rb
+2
-4
未找到文件。
actionpack/lib/action_controller.rb
浏览文件 @
2f326b7f
...
...
@@ -8,6 +8,7 @@ module ActionController
autoload
:Caching
autoload
:Metal
autoload
:Middleware
autoload
:UriParser
autoload_under
"metal"
do
autoload
:Compatibility
...
...
actionpack/lib/action_controller/caching/actions.rb
浏览文件 @
2f326b7f
...
...
@@ -141,6 +141,8 @@ def filter(controller)
end
class
ActionCachePath
include
UriParser
attr_reader
:path
,
:extension
# If +infer_extension+ is true, the cache path extension is looked up from the request's
...
...
@@ -163,10 +165,6 @@ def normalize!(path)
path
<<
".
#{
extension
}
"
if
extension
and
!
path
.
ends_with?
(
extension
)
uri_parser
.
unescape
(
path
)
end
def
uri_parser
@uri_parser
||=
URI
.
const_defined?
(
:Parser
)
?
URI
::
Parser
.
new
:
URI
end
end
end
end
...
...
actionpack/lib/action_controller/caching/pages.rb
浏览文件 @
2f326b7f
require
'fileutils'
require
'uri'
require
'active_support/core_ext/class/attribute_accessors'
module
ActionController
#:nodoc:
...
...
@@ -58,6 +57,8 @@ module Pages
end
module
ClassMethods
include
UriParser
# Expires the page that was cached with the +path+ as a key. Example:
# expire_page "/lists/show"
def
expire_page
(
path
)
...
...
actionpack/lib/action_controller/test_case.rb
浏览文件 @
2f326b7f
...
...
@@ -129,10 +129,6 @@ def to_s() join '/' end
def
self
.
new_escaped
(
strings
)
new
strings
.
collect
{
|
str
|
uri_parser
.
unescape
str
}
end
def
uri_parser
@uri_parser
||=
URI
.
const_defined?
(
:Parser
)
?
URI
::
Parser
.
new
:
URI
end
end
def
assign_parameters
(
routes
,
controller_path
,
action
,
parameters
=
{})
...
...
actionpack/lib/action_controller/uri_parser.rb
0 → 100644
浏览文件 @
2f326b7f
require
'uri'
module
ActionController
#:nodoc:
module
UriParser
def
uri_parser
@uri_parser
||=
URI
.
const_defined?
(
:Parser
)
?
URI
::
Parser
.
new
:
URI
end
end
end
actionpack/lib/action_dispatch/routing/route_set.rb
浏览文件 @
2f326b7f
...
...
@@ -5,6 +5,8 @@
module
ActionDispatch
module
Routing
class
RouteSet
#:nodoc:
include
ActionController
::
UriParser
PARAMETERS_KEY
=
'action_dispatch.request.path_parameters'
class
Dispatcher
#:nodoc:
...
...
@@ -68,10 +70,6 @@ def merge_default_action!(params)
def
split_glob_param!
(
params
)
params
[
@glob_param
]
=
params
[
@glob_param
].
split
(
'/'
).
map
{
|
v
|
uri_parser
.
unescape
(
v
)
}
end
def
uri_parser
@uri_parser
||=
URI
.
const_defined?
(
:Parser
)
?
URI
::
Parser
.
new
:
URI
end
end
# A NamedRouteCollection instance is a collection of named routes, and also
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录