lib/active_resource/custom_methods.rb in activeresource-2.0.5 vs lib/active_resource/custom_methods.rb in activeresource-2.1.0
- old
+ new
@@ -5,16 +5,16 @@
#
# map.resources :people, :new => { :register => :post },
# :member => { :promote => :put, :deactivate => :delete }
# :collection => { :active => :get }
#
- # This route set creates routes for the following http requests:
+ # 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.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
#
# Using this module, Active Resource can use these custom REST methods just like the
# standard methods.
#
# class Person < ActiveResource::Base
@@ -46,11 +46,11 @@
#
# Person.get(:active, :awesome => true) # GET /people/active.xml?awesome=true
# # => [{:id => 1, :name => 'Ryan'}]
#
# Note: the objects returned from this method are not automatically converted
- # into ActiveResource instances - they are ordinary Hashes. If you are expecting
- # ActiveResource instances, use the <tt>find</tt> class method with the
+ # into Active Resource instances - they are ordinary Hashes. If you are expecting
+ # Active Resource instances, use the <tt>find</tt> class method with the
# <tt>:from</tt> option. For example:
#
# Person.find(:all, :from => :active)
def get(custom_method_name, options = {})
connection.get(custom_method_collection_url(custom_method_name, options), headers)