diff options
Diffstat (limited to 'app/models/concerns/update_project_statistics.rb')
-rw-r--r-- | app/models/concerns/update_project_statistics.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/update_project_statistics.rb b/app/models/concerns/update_project_statistics.rb index bffc711c886..67e1f0ec930 100644 --- a/app/models/concerns/update_project_statistics.rb +++ b/app/models/concerns/update_project_statistics.rb @@ -39,12 +39,12 @@ module UpdateProjectStatistics end def update_project_statistics_attribute_changed? - attribute_changed?(self.class.statistic_attribute) + saved_change_to_attribute?(self.class.statistic_attribute) end def update_project_statistics_after_save attr = self.class.statistic_attribute - delta = read_attribute(attr).to_i - attribute_was(attr).to_i + delta = read_attribute(attr).to_i - attribute_before_last_save(attr).to_i update_project_statistics(delta) end |