aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/custom_methods.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-17 19:50:34 -0400
committerJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-18 00:34:10 -0400
commit00958696d871da3126113be70bb858d078b86ab5 (patch)
tree6e4ce7a5389a171cf2be8d11de5aefa6e2bcc4cf /activeresource/lib/active_resource/custom_methods.rb
parentb641ab5baec0956c0135e7341ca238eff3f9d5a5 (diff)
downloadrails-00958696d871da3126113be70bb858d078b86ab5.tar.gz
rails-00958696d871da3126113be70bb858d078b86ab5.tar.bz2
rails-00958696d871da3126113be70bb858d078b86ab5.zip
corrected some further tests and docs for the ARes change to json change
Diffstat (limited to 'activeresource/lib/active_resource/custom_methods.rb')
-rw-r--r--activeresource/lib/active_resource/custom_methods.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/activeresource/lib/active_resource/custom_methods.rb b/activeresource/lib/active_resource/custom_methods.rb
index 38473c6cf7..c1931b2758 100644
--- a/activeresource/lib/active_resource/custom_methods.rb
+++ b/activeresource/lib/active_resource/custom_methods.rb
@@ -11,10 +11,10 @@ module ActiveResource
#
# This route set creates routes for the following HTTP requests:
#
- # POST /people/new/register.xml # PeopleController.register
- # PUT /people/1/promote.xml # PeopleController.promote with :id => 1
- # DELETE /people/1/deactivate.xml # PeopleController.deactivate with :id => 1
- # GET /people/active.xml # PeopleController.active
+ # POST /people/new/register.json # PeopleController.register
+ # 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
#
# Using this module, Active Resource can use these custom REST methods just like the
# standard methods.
@@ -23,13 +23,13 @@ module ActiveResource
# self.site = "http://37s.sunrise.i:3000"
# end
#
- # Person.new(:name => 'Ryan).post(:register) # POST /people/new/register.xml
+ # Person.new(:name => 'Ryan).post(:register) # POST /people/new/register.json
# # => { :id => 1, :name => 'Ryan' }
#
- # Person.find(1).put(:promote, :position => 'Manager') # PUT /people/1/promote.xml
- # Person.find(1).delete(:deactivate) # DELETE /people/1/deactivate.xml
+ # Person.find(1).put(:promote, :position => 'Manager') # PUT /people/1/promote.json
+ # Person.find(1).delete(:deactivate) # DELETE /people/1/deactivate.json
#
- # Person.get(:active) # GET /people/active.xml
+ # Person.get(:active) # GET /people/active.json
# # => [{:id => 1, :name => 'Ryan'}, {:id => 2, :name => 'Joe'}]
#
module CustomMethods
@@ -41,10 +41,10 @@ module ActiveResource
# Invokes a GET to a given custom REST method. For example:
#
- # Person.get(:active) # GET /people/active.xml
+ # Person.get(:active) # GET /people/active.json
# # => [{:id => 1, :name => 'Ryan'}, {:id => 2, :name => 'Joe'}]
#
- # Person.get(:active, :awesome => true) # GET /people/active.xml?awesome=true
+ # Person.get(:active, :awesome => true) # GET /people/active.json?awesome=true
# # => [{:id => 1, :name => 'Ryan'}]
#
# Note: the objects returned from this method are not automatically converted