Closed JarriqTheTechie closed 7 months ago
@josephmancuso please review. If this is merged I'll create a PR for decrement_each also.
@JarriqTheTechie fix the conflicts.
I will work on correcting the conflicts and writing some tests this week if time permits.
Closing this PR. Will open a new one.
Adds function increment_each. This allows specifying multiple columns to increment by
e.g.
The following will increment the users age by 5 and its children by 10.
User.find(1).increment_each([ {"age": 5}, {"children", 10} ])
the result of the action returns either model or a querybuilder
This change also rewrites the original increment function to use the new increment_each function. The function signature remains intact.