Categories: None [Edit]
delta_attributes
This gem makes updating specified number fields by ActiveRecord in unusual way.
Instead of generating sql script to update value in usual way like this:
UPDATE users
SET money = 10
WHERE id = 1;
It replaces it with
UPDATE users
SET money = money + delta
WHERE id = 1;
where delta is difference between old value and new value of that field.
This solves problem with simultaneous updating of the same field by different threads
(problem known as race condition).
Source code: https://github.com/izbor/delta_attributes
Total
Ranking: 49,033 of 183,477
Downloads: 20,810
Daily
Ranking: 41,916 of 183,470
Downloads: 1
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Depends on
Rank | Downloads | Name |
---|---|---|
41 | 573,259,067 | rails |
Owners
# | Gravatar | Handle |
---|---|---|
1 | oleh_novosad |