aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-10-01 10:20:50 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-10-01 10:20:50 +0900
commit28ac0b30f24ce4d4da8a21da06d2f84ad4fce3bf (patch)
treefd6226096551f42b58f3eb916b8fa7b75565bd6d /actionpack
parentb13a5cb83ea00d6a3d71320fd276ca21049c2544 (diff)
parente385e4678fc64be6e176c3bdac6641db9fe48d85 (diff)
downloadrails-28ac0b30f24ce4d4da8a21da06d2f84ad4fce3bf.tar.gz
rails-28ac0b30f24ce4d4da8a21da06d2f84ad4fce3bf.tar.bz2
rails-28ac0b30f24ce4d4da8a21da06d2f84ad4fce3bf.zip
Merge pull request #33256 from ilkkao/ilkkao/remove-unused-params-option
Don't handle params option in a special way in url_for helper
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG.md4
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb4
-rw-r--r--actionpack/test/controller/base_test.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index dfe6e00865..c972c64766 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Remove undocumented `params` option from `url_for` helper.
+
+ *Ilkka Oksanen*
+
* Encode Content-Disposition filenames on `send_data` and `send_file`.
Previously, `send_data 'data', filename: "\u{3042}.txt"` sends
`"filename=\"\u{3042}.txt\""` as Content-Disposition and it can be
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index dc97d4b89c..3b7611acc0 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -858,10 +858,6 @@ module ActionDispatch
path, params = generate(route_name, path_options, recall)
- if options.key? :params
- params.merge! options[:params]
- end
-
options[:path] = path
options[:script_name] = script_name
options[:params] = params
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index d8cea10153..558e710df9 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -193,7 +193,7 @@ class UrlOptionsTest < ActionController::TestCase
action: "home",
controller: "pages",
only_path: true,
- params: { "token" => "secret" }
+ token: "secret"
}
assert_equal "/home?token=secret", rs.url_for(options)