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...
1 parent aad45f9 commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 Marshall Huss committed May 5, 2008
Showing with 8 additions and 1 deletion.
  1. +8 −1 activeresource/lib/active_resource/base.rb
View
9 activeresource/lib/active_resource/base.rb
@@ -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
#

0 comments on commit 0ec7c0a

Please sign in to comment.