aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/custom_methods.rb2
-rw-r--r--activeresource/lib/active_resource/http_mock.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/activeresource/lib/active_resource/custom_methods.rb b/activeresource/lib/active_resource/custom_methods.rb
index 095dcd2a8e..839dc79d50 100644
--- a/activeresource/lib/active_resource/custom_methods.rb
+++ b/activeresource/lib/active_resource/custom_methods.rb
@@ -12,7 +12,7 @@ module ActiveResource
# This route set creates routes for the following HTTP requests:
#
# POST /people/new/register.json # PeopleController.register
- # PUT/PATCH /people/1/promote.json # PeopleController.promote with :id => 1
+ # PATCH/PUT /people/1/promote.json # PeopleController.promote with :id => 1
# DELETE /people/1/deactivate.json # PeopleController.deactivate with :id => 1
# GET /people/active.json # PeopleController.active
#
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb
index 820b178d4b..9856f5872f 100644
--- a/activeresource/lib/active_resource/http_mock.rb
+++ b/activeresource/lib/active_resource/http_mock.rb
@@ -55,7 +55,7 @@ module ActiveResource
@responses = responses
end
- [ :post, :put, :patch, :get, :delete, :head ].each do |method|
+ [ :post, :patch, :put, :get, :delete, :head ].each do |method|
# def post(path, request_headers = {}, body = nil, status = 200, response_headers = {})
# @responses[Request.new(:post, path, nil, request_headers)] = Response.new(body || "", status, response_headers)
# end
@@ -291,9 +291,9 @@ module ActiveResource
if resp_cls && !resp_cls.body_permitted?
@body = nil
end
-
+
self['Content-Length'] = @body.nil? ? "0" : body.size.to_s
-
+
end
# Returns true if code is 2xx,