From c5d64b2b86aa42f57881091491ee289b3c489c7e Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 21 May 2014 16:07:57 -0700 Subject: 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. --- actionpack/lib/action_dispatch/http/parameters.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb index dcb299ed03..378d7393ff 100644 --- a/actionpack/lib/action_dispatch/http/parameters.rb +++ b/actionpack/lib/action_dispatch/http/parameters.rb @@ -25,8 +25,8 @@ module ActionDispatch 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 path_parameters with explicitly symbolized keys. @@ -41,7 +41,7 @@ module ActionDispatch # # See symbolized_path_parameters for symbolized keys. def path_parameters - @env["action_dispatch.request.path_parameters"] ||= {} + @env[Routing::RouteSet::PARAMETERS_KEY] ||= {} end def reset_parameters #:nodoc: -- cgit v1.2.3