diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-09 22:21:55 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-09 22:21:55 +0000 |
commit | 5396b0f3b0c2f6a2afc4ab1af114123bc410cc4d (patch) | |
tree | e6b9d665528f28830f139881ebb4119f11a0a9f6 /activeresource/lib/active_resource/http_mock.rb | |
parent | 9e13b966f6fa19b19c34abfe29400b6f826e00c7 (diff) | |
download | rails-5396b0f3b0c2f6a2afc4ab1af114123bc410cc4d.tar.gz rails-5396b0f3b0c2f6a2afc4ab1af114123bc410cc4d.tar.bz2 rails-5396b0f3b0c2f6a2afc4ab1af114123bc410cc4d.zip |
Use HEAD instead of GET inside exists? Closes #11062 [bscofield]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib/active_resource/http_mock.rb')
-rw-r--r-- | activeresource/lib/active_resource/http_mock.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb index d70364c5eb..d1c1412575 100644 --- a/activeresource/lib/active_resource/http_mock.rb +++ b/activeresource/lib/active_resource/http_mock.rb @@ -9,7 +9,7 @@ module ActiveResource @responses = responses end - for method in [ :post, :put, :get, :delete ] + for method in [ :post, :put, :get, :delete, :head ] module_eval <<-EOE, __FILE__, __LINE__ def #{method}(path, request_headers = {}, body = nil, status = 200, response_headers = {}) @responses[Request.new(:#{method}, path, nil, request_headers)] = Response.new(body || "", status, response_headers) @@ -56,7 +56,7 @@ module ActiveResource EOE end - for method in [ :get, :delete ] + for method in [ :get, :delete, :head ] module_eval <<-EOE, __FILE__, __LINE__ def #{method}(path, headers) request = ActiveResource::Request.new(:#{method}, path, nil, headers) |