Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added information of how to set element_name in the case the user has…

… a name confliction with an existing model
  • Loading branch information...
commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 1 parent aad45f9
Marshall Huss authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 activeresource/lib/active_resource/base.rb
9 activeresource/lib/active_resource/base.rb
View
@@ -19,7 +19,14 @@ module ActiveResource
# end
#
# Now the Person class is mapped to RESTful resources located at <tt>http://api.people.com:3000/people/</tt>, and
- # you can now use Active Resource's lifecycles methods to manipulate resources.
+ # you can now use Active Resource's lifecycles methods to manipulate resources. In the case where you already have
+ # an existing model with the same name as the desired RESTful resource you can set the +element_name+ value.
+ #
+ # class PersonResource < ActiveResource::Base
+ # self.site = "http://api.people.com:3000/"
+ # self.element_name = "person"
+ # end
+ #
#
# == Lifecycle methods
#
Please sign in to comment.
Something went wrong with that request. Please try again.