提交 a05a9ff1 编写于 作者: A Aaron Patterson

stop using a hash for parameterizing

上级 5f0b37c4
...@@ -350,8 +350,7 @@ def add_route(app, conditions = {}, requirements = {}, defaults = {}, name = nil ...@@ -350,8 +350,7 @@ def add_route(app, conditions = {}, requirements = {}, defaults = {}, name = nil
end end
class Generator #:nodoc: class Generator #:nodoc:
PARAMETERIZE = { PARAMETERIZE = lambda do |name, value|
:parameterize => lambda do |name, value|
if name == :controller if name == :controller
value value
elsif value.is_a?(Array) elsif value.is_a?(Array)
...@@ -361,7 +360,6 @@ class Generator #:nodoc: ...@@ -361,7 +360,6 @@ class Generator #:nodoc:
param.split('/').map { |v| Rack::Mount::Utils.escape_uri(v) }.join("/") param.split('/').map { |v| Rack::Mount::Utils.escape_uri(v) }.join("/")
end end
end end
}
attr_reader :options, :recall, :set, :named_route attr_reader :options, :recall, :set, :named_route
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册