From f7277d99bf76e947fd404ac316eafeb993cc5bcd Mon Sep 17 00:00:00 2001 From: Michiel Sikkes Date: Mon, 28 Jan 2013 21:18:57 +0100 Subject: 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. --- actionpack/lib/action_view/helpers/url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/url_helper.rb') 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) -- cgit v1.2.3