Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
97cd3e8c
Commit
97cd3e8c
authored
Apr 19, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove use of deprecated methods
Changed after upstream refactor
parent
6bbe3c29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/models/concerns/update_project_statistics.rb
app/models/concerns/update_project_statistics.rb
+2
-2
No files found.
app/models/concerns/update_project_statistics.rb
View file @
97cd3e8c
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment