summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2017-05-10 23:54:10 +0300
committerValery Sizov <valery@gitlab.com>2017-05-12 14:12:29 +0300
commite2a3a5095abd8c1fa57dd19e4ff693ae4021fde8 (patch)
tree435cd38964d20a0b1ad67b9dc02dcdbbe76d00c1 /app/models/merge_request.rb
parent92bf7dfcb040e3e035fc87b0a70461f891284c98 (diff)
downloadgitlab-ce-e2a3a5095abd8c1fa57dd19e4ff693ae4021fde8.tar.gz
Move update_assignee_cache_counts to the service
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r--app/models/merge_request.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 59736f70f24..9e5db53b15e 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -125,7 +125,6 @@ class MergeRequest < ActiveRecord::Base
participant :assignee
after_save :keep_around_commit
- after_save :update_assignee_cache_counts, if: :assignee_id_changed?
def self.reference_prefix
'!'
@@ -187,13 +186,6 @@ class MergeRequest < ActiveRecord::Base
work_in_progress?(title) ? title : "WIP: #{title}"
end
- def update_assignee_cache_counts
- # make sure we flush the cache for both the old *and* new assignees(if they exist)
- previous_assignee = User.find_by_id(assignee_id_was) if assignee_id_was
- previous_assignee&.update_cache_counts
- assignee&.update_cache_counts
- end
-
# Returns a Hash of attributes to be used for Twitter card metadata
def card_attributes
{