Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PATCH aka update_record_fields in README #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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] = "[email protected]"
@table.update(record)
# => #<Airtable::Record :name=>"", :email=>"[email protected]", :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: "[email protected]"}
@table.update_record_fields(record.id, @single_record_update)
# => #<Airtable::Record :name=>"Sarah Jaine", :email=>"[email protected]", :id=>"rec03sKOVIzU65eV4">
```

Expand Down