diff options
author | Marshall Huss <mwhuss@Macbook.local> | 2008-05-04 23:21:33 -0400 |
---|---|---|
committer | Marshall Huss <mwhuss@Macbook.local> | 2008-05-04 23:21:33 -0400 |
commit | 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 (patch) | |
tree | 3f5f44a892082b85c6a1dd0b6a4077d76a9acc3e | |
parent | aad45f920d003ba27f33a9ef28d39199eeb69826 (diff) | |
download | rails-0ec7c0a41d889d4e5382b9dff72f1aaba89bf297.tar.gz rails-0ec7c0a41d889d4e5382b9dff72f1aaba89bf297.tar.bz2 rails-0ec7c0a41d889d4e5382b9dff72f1aaba89bf297.zip |
Added information of how to set element_name in the case the user has a name confliction with an existing model
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 9 |
1 files changed, 8 insertions, 1 deletions
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 <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 # |