diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-01-24 02:40:32 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-01-24 02:40:32 +0000 |
commit | f49e449ed5d140b63f30ac046826f81c04e8333d (patch) | |
tree | 7821ff304545f96a5cca25e3edff81caea2db3ad /activeresource/README | |
parent | 0eb8398cfa6d4abf20c85fa59fa1a284dd992172 (diff) | |
download | rails-f49e449ed5d140b63f30ac046826f81c04e8333d.tar.gz rails-f49e449ed5d140b63f30ac046826f81c04e8333d.tar.bz2 rails-f49e449ed5d140b63f30ac046826f81c04e8333d.zip |
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
Diffstat (limited to 'activeresource/README')
-rw-r--r-- | activeresource/README | 5 |
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 # |