From 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 Mon Sep 17 00:00:00 2001 From: Marshall Huss Date: Sun, 4 May 2008 23:21:33 -0400 Subject: Added information of how to set element_name in the case the user has a name confliction with an existing model --- activeresource/lib/active_resource/base.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index eff92c91de..576828b480 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -19,7 +19,14 @@ module ActiveResource # end # # Now the Person class is mapped to RESTful resources located at http://api.people.com:3000/people/, 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 # -- cgit v1.2.3