Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanavath committed Mar 14, 2018
1 parent ba3713a commit cf87369
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,24 @@ tyler.first = 'Tyson'
tyler.save() # true
```

Partial Update
------
'save' is also used to partially update an existing resource. If a list of attributes is passed in as argument
```
# {"first":"Tyler"}
#
# is submitted as the body on
#
# PATCH http://api.people.com:3000/people/1.json
#
# when save is called on an existing Person object. An empty response is
# is expected with code (204)
#
tyler.first = 'Tyson'
tyler.last = 'Johnson'
tyler.save(['first']) # true
```

Delete
-----
Destruction of a resource can be invoked as a class and instance method of the resource.
Expand Down

0 comments on commit cf87369

Please sign in to comment.