Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,18 @@ Records can be inserted using the `create` method on a table:
### Updating Records

Records can be updated using the `update` method on a table:

PUT will perform a destructive update and clear all unspecified cell values.
```ruby
@record[:email] = "sarahjaine@updated.com"
@table.update(record)
# => #<Airtable::Record :name=>"", :email=>"sarahjaine@updated.com", :id=>"rec03sKOVIzU65eV4">
```

Records can be updated using the `update_record_fields` method on a table:
PATCH only update the fields you specify, leaving the rest as they were
```ruby
@single_record_update = {email: "sarahjaine@updated.com"}
@table.update_record_fields(record.id, @single_record_update)
# => #<Airtable::Record :name=>"Sarah Jaine", :email=>"sarahjaine@updated.com", :id=>"rec03sKOVIzU65eV4">
```

Expand Down