summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-04-19 19:22:01 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-04-23 08:31:23 +0800
commit97cd3e8c5ac3f96169b9b82e78b90f54ca1fcb22 (patch)
treeb88ea1d381ff468362c9fb939bbd93c403cfdbd7
parent6bbe3c2922c44753649fc65ed1386d123613af67 (diff)
downloadgitlab-ce-97cd3e8c5ac3f96169b9b82e78b90f54ca1fcb22.tar.gz
Remove use of deprecated methodsupgrade-to-rails-5-1
Changed after upstream refactor
-rw-r--r--app/models/concerns/update_project_statistics.rb4
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