Commit 97cd3e8c authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Remove use of deprecated methods

Changed after upstream refactor
parent 6bbe3c29
...@@ -39,12 +39,12 @@ module UpdateProjectStatistics ...@@ -39,12 +39,12 @@ module UpdateProjectStatistics
end end
def update_project_statistics_attribute_changed? def update_project_statistics_attribute_changed?
attribute_changed?(self.class.statistic_attribute) saved_change_to_attribute?(self.class.statistic_attribute)
end end
def update_project_statistics_after_save def update_project_statistics_after_save
attr = self.class.statistic_attribute 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) update_project_statistics(delta)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment