aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorMichiel Sikkes <michiel.sikkes@gmail.com>2013-01-28 21:18:57 +0100
committerMichiel Sikkes <michiel.sikkes@gmail.com>2013-01-28 21:18:57 +0100
commitf7277d99bf76e947fd404ac316eafeb993cc5bcd (patch)
tree2be2c71b5b82bf3e693e8f676906da407f464d5a /actionpack/lib/action_view/helpers/url_helper.rb
parentc4bc360e4edcdf8b05e334582d4ab5bc41ed2abc (diff)
downloadrails-f7277d99bf76e947fd404ac316eafeb993cc5bcd.tar.gz
rails-f7277d99bf76e947fd404ac316eafeb993cc5bcd.tar.bz2
rails-f7277d99bf76e947fd404ac316eafeb993cc5bcd.zip
Make current_url? work with a HEAD method
ActionDispatch::Head was removed in favor of Rack::Head. But Rack::Head does not convert GET requests to HEAD requests so we need to do checking for HEAD requests ourselves.
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index bade121d44..5e20b557d8 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -514,7 +514,7 @@ module ActionView
"in a #request method"
end
- return false unless request.get?
+ return false unless request.get? || request.head?
url_string = url_for(options)