From f49e449ed5d140b63f30ac046826f81c04e8333d Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Wed, 24 Jan 2007 02:40:32 +0000 Subject: Carry over the convenience of #create from ActiveRecord. Closes #7340. [Ryan Daigle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6025 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activeresource/README | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activeresource/README') 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 create 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 # -- cgit v1.2.3