diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-07-01 23:42:41 -0700 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-07-02 16:05:55 -0700 |
commit | cb5f2d321587e80964e051b52c5d7e5a3cc0aaaa (patch) | |
tree | 6213805803a5e4033e4e57ca15cca3519434376a /actionpack/lib/action_dispatch | |
parent | a4104278b5cc5a7e7b15473c1ea74125f915f2db (diff) | |
download | rails-cb5f2d321587e80964e051b52c5d7e5a3cc0aaaa.tar.gz rails-cb5f2d321587e80964e051b52c5d7e5a3cc0aaaa.tar.bz2 rails-cb5f2d321587e80964e051b52c5d7e5a3cc0aaaa.zip |
Remove symbolized_path_parameters.
This pull request is a continuation of https://github.com/rails/rails/commit/925bd975 and https://github.com/rails/rails/commit/8d8ebe3d.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/parameters.rb | 7 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb index 5f7627cf96..6f10fcd9bf 100644 --- a/actionpack/lib/action_dispatch/http/parameters.rb +++ b/actionpack/lib/action_dispatch/http/parameters.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/hash/keys' require 'active_support/core_ext/hash/indifferent_access' +require 'active_support/deprecation' module ActionDispatch module Http @@ -24,8 +25,10 @@ module ActionDispatch @env[PARAMETERS_KEY] = parameters end - # The same as <tt>path_parameters</tt> with explicitly symbolized keys. def symbolized_path_parameters + ActiveSupport::Deprecation.warn( + "`symbolized_path_parameters` is deprecated. Please use `path_parameters`" + ) path_parameters end @@ -33,8 +36,6 @@ module ActionDispatch # Returned hash keys are strings: # # {'action' => 'my_action', 'controller' => 'my_controller'} - # - # See <tt>symbolized_path_parameters</tt> for symbolized keys. def path_parameters @env[PARAMETERS_KEY] ||= {} end diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index 57c678843b..de3dc5f924 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -39,7 +39,7 @@ module ActionDispatch end def action=(action_name) - path_parameters["action"] = action_name.to_s + path_parameters[:action] = action_name.to_s end def if_modified_since=(last_modified) |