不要怂,就是干,撸起袖子干!

Commit 8ed2379c by Ruben Bridgewater

Fix increment and decrement docs. Closes #3228

1 parent 00576687
Showing with 4 additions and 4 deletions
......@@ -292,7 +292,7 @@ First of all you can define a field and the value you want to add to it.
```js
User.findById(1).then(function(user) {
user.increment('my-integer-field', 2).then(/* ... */)
user.increment('my-integer-field', {by: 2}).then(/* ... */)
})
```
......@@ -300,7 +300,7 @@ Second, you can define multiple fields and the value you want to add to th
```js
User.findById(1).then(function(user) {
user.increment([ 'my-integer-field', 'my-very-other-field' ], 2).then(/* ... */)
user.increment([ 'my-integer-field', 'my-very-other-field' ], {by: 2}).then(/* ... */)
})
```
......@@ -323,7 +323,7 @@ First of all you can define a field and the value you want to add to it.
```js
User.findById(1).then(function(user) {
user.decrement('my-integer-field', 2).then(/* ... */)
user.decrement('my-integer-field', {by: 2}).then(/* ... */)
})
```
......@@ -331,7 +331,7 @@ Second, you can define multiple fields and the value you want to add to th
```js
User.findById(1).then(function(user) {
user.decrement([ 'my-integer-field', 'my-very-other-field' ], 2).then(/* ... */)
user.decrement([ 'my-integer-field', 'my-very-other-field' ], {by: 2}).then(/* ... */)
})
```
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!