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

Commit ce84e892 by Mick Hansen

Merge pull request #3744 from BridgeAR/fix-docs

Fix increment and decrement docs. Closes #3228
2 parents 286543b1 8ed2379c
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. ...@@ -292,7 +292,7 @@ First of all you can define a field and the value you want to add to it.
```js ```js
User.findById(1).then(function(user) { 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 ...@@ -300,7 +300,7 @@ Second, you can define multiple fields and the value you want to add to th
```js ```js
User.findById(1).then(function(user) { 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. ...@@ -323,7 +323,7 @@ First of all you can define a field and the value you want to add to it.
```js ```js
User.findById(1).then(function(user) { 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 ...@@ -331,7 +331,7 @@ Second, you can define multiple fields and the value you want to add to th
```js ```js
User.findById(1).then(function(user) { 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!