Browse files

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.
  • Loading branch information...
1 parent 15adf77 commit c5d64b2b86aa42f57881091491ee289b3c489c7e @tenderlove tenderlove committed May 21, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_dispatch/http/parameters.rb
6 actionpack/lib/action_dispatch/http/parameters.rb
@@ -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)
lexmag added a line comment May 22, 2014

Previously @env.delete was by ...request.parameters key not ...request.path_parameters.
Guess it can break #parameters.
@tenderlove is it correct?

Ruby on Rails member
rafaelfranca added a line comment May 22, 2014

I think It is not correct. The tests are not broken with this change what is really bad.

Ruby on Rails member
rafaelfranca added a line comment May 22, 2014

Fixed at 9086f61. I'm trying to write a test case for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ @env[Routing::RouteSet::PARAMETERS_KEY] = parameters
# 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] ||= {}
def reset_parameters #:nodoc:

1 comment on commit c5d64b2

Ruby on Rails member

Oops. Totally my mistake. I'm sorry. :-(

Please sign in to comment.