diff options
author | Xavier Noria <fxn@hashref.com> | 2012-02-24 16:35:48 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-02-24 16:35:48 -0800 |
commit | 3008188cd6c0cca8789e8b7c57a4f896e2ff07d5 (patch) | |
tree | 7cb1eb98c228cebaa343a417208f6ab8bf3c7a40 /activeresource/lib/active_resource | |
parent | b7a094536de6fdeb428aa79d21f1e2128169f45e (diff) | |
download | rails-3008188cd6c0cca8789e8b7c57a4f896e2ff07d5.tar.gz rails-3008188cd6c0cca8789e8b7c57a4f896e2ff07d5.tar.bz2 rails-3008188cd6c0cca8789e8b7c57a4f896e2ff07d5.zip |
consistently mention first patch, then put
There was a mix, sometimes patch first, sometimes put first.
Use always patch first, since this is going to be the
primary verb for updates.
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r-- | activeresource/lib/active_resource/custom_methods.rb | 2 | ||||
-rw-r--r-- | activeresource/lib/active_resource/http_mock.rb | 6 |
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, |