From 97cd3e8c5ac3f96169b9b82e78b90f54ca1fcb22 Mon Sep 17 00:00:00 2001 From: Heinrich Lee Yu Date: Fri, 19 Apr 2019 19:22:01 +0800 Subject: Remove use of deprecated methods Changed after upstream refactor --- app/models/concerns/update_project_statistics.rb | 4 ++-- 1 file 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 -- cgit v1.2.1