aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/README
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/README')
-rw-r--r--activeresource/README5
1 files changed, 5 insertions, 0 deletions
diff --git a/activeresource/README b/activeresource/README
index 702ab7efed..696b5e4fed 100644
--- a/activeresource/README
+++ b/activeresource/README
@@ -36,6 +36,11 @@ lifecycle methods that operate against a persistent store.
Person.exists?(ryan.id) #=> true
ryan.exists? #=> true
+ # Resource creation can also use the convenience <tt>create</tt> method which
+ # will request a resource save after instantiation.
+ ryan = Person.create(:first => 'Ryan', :last => 'Daigle')
+ ryan.exists? #=> true
+
# Updating is done with 'save' as well
# PUT http://api.people.com:3000/people/1.xml
#