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

use the existing constant rather than the hardcoded string

so tht I don't go totally insane with THsi crazy hash driven
development. why is Everything a hash? Why do people think hashes in
hashes with random keys is a Good API? You can't find things or
deprecate them or control access whatsoever, you just have to hope that
everyone is like "oh, you want to change that? that's cool! we all know
it's hashes so go for it!"

The End.
上级 15adf778
......@@ -25,8 +25,8 @@ def parameters
def path_parameters=(parameters) #:nodoc:
@symbolized_path_params = nil
@env.delete("action_dispatch.request.parameters")
@env["action_dispatch.request.path_parameters"] = parameters
@env.delete(Routing::RouteSet::PARAMETERS_KEY)
@env[Routing::RouteSet::PARAMETERS_KEY] = parameters
end
# The same as <tt>path_parameters</tt> with explicitly symbolized keys.
......@@ -41,7 +41,7 @@ def symbolized_path_parameters
#
# See <tt>symbolized_path_parameters</tt> for symbolized keys.
def path_parameters
@env["action_dispatch.request.path_parameters"] ||= {}
@env[Routing::RouteSet::PARAMETERS_KEY] ||= {}
end
def reset_parameters #:nodoc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册