Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

datamapper/dm-adjust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dm-adjust

DataMapper plugin providing methods to increment and decrement properties

It provides the following function (for collections and resources):

adjust!

Person.adjust!(:salary => 1000) # increases the salary of all people with 1000.
Person.all(:age.gte => 40).adjust!(:salary => 2000) # increase salary of them oldies.
@child.adjust!(:allowance => -100) # less money for candy and concerts

About

DataMapper plugin providing methods to increment and decrement properties

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages