Permalink
Browse files

Active Resource - guide for update/save

  • Loading branch information...
vishnuatrai authored and fxn committed Aug 1, 2011
1 parent aa9da1f commit 212654be02e28ee97d75819b0f799ccb6f7b9130
Showing with 10 additions and 0 deletions.
  1. +10 −0 railties/guides/source/active_resource_basics.textile
@@ -50,6 +50,16 @@ person = Person.create(:name => 'Vishnu')
person.id # => 1
</ruby>
h4. Update
To update an existing resource, 'save' method is used. This method make a HTTP PUT request in JSON format.
<ruby>
person = Person.find(1)
person.name = 'Atrai'
person.save
</ruby>
h3. Changelog
* July 30, 2011: Initial version by "Vishnu Atrai":http://github.com/vatrai

0 comments on commit 212654b

Please sign in to comment.