diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-19 22:18:03 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-19 22:18:03 +0000 |
commit | c97f329b2a76439cd4fe71debdd64c71e9890b48 (patch) | |
tree | 8fb960628936763a23729390152d024a5b3908d1 /activeresource/lib/active_resource/http_mock.rb | |
parent | a0e78f7442143c1366de06ec28342ad728870a1c (diff) | |
download | rails-c97f329b2a76439cd4fe71debdd64c71e9890b48.tar.gz rails-c97f329b2a76439cd4fe71debdd64c71e9890b48.tar.bz2 rails-c97f329b2a76439cd4fe71debdd64c71e9890b48.zip |
Disregard namespaces from the default element name, so Highrise::Person will just try to fetch from "/people", not "/highrise/people" [DHH] Added that saves which get a body response (and not just a 201) will use that response to update themselves [DHH] Fixed constant warning when fetching the same object multiple times [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6539 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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb index 3ce31a50ea..90823babd1 100644 --- a/activeresource/lib/active_resource/http_mock.rb +++ b/activeresource/lib/active_resource/http_mock.rb @@ -12,7 +12,7 @@ module ActiveResource for method in [ :post, :put, :get, :delete ] module_eval <<-EOE 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) + @responses[Request.new(:#{method}, path, nil, request_headers)] = Response.new(body || "", status, response_headers) end EOE end |