Skip to content

Commit 80fe3d6

Browse files
README: columns argument is mandatory (#8)
1 parent cfc010d commit 80fe3d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cat1.birthday = '2024-01-01'
1616
cat2.birthday = '2024-06-06'
1717
cat3.birthday = '1900-01-01'
1818

19-
Cat.batch_update([cat1, cat2, cat3]) # issues a single SQL query
19+
Cat.batch_update([cat1, cat2, cat3], columns: :all) # issues a single SQL query
2020
```
2121

2222
The SQL query looks like the following:
@@ -45,12 +45,12 @@ Ignore model validations (all validations run by default):
4545
```ruby
4646
cat1.name = ''
4747
cat2.name = ''
48-
Cat.batch_update([cat1, cat2], validate: false)
48+
Cat.batch_update([cat1, cat2], columns: :all, validate: false)
4949
```
5050

5151
Specify a different batch size (100 by default):
52-
```
53-
Cat.batch_update(cats, batch_size: 1000)
52+
```ruby
53+
Cat.batch_update(cats, columns: :all, batch_size: 1000)
5454
```
5555

5656
## License

0 commit comments

Comments
 (0)