summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-04-10 18:41:36 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-04-10 18:41:36 -0400
commita1a94e739e73adf0225aa823e476b15e30b9bb30 (patch)
tree453fd51204ca62091bbe0285e3a7148085e58626
parentadd1c188603ac4f9f895e5cb84a48ebc1deee394 (diff)
downloadgitlab-ce-a1a94e739e73adf0225aa823e476b15e30b9bb30.tar.gz
Remove an unused `cared` scope from Issue and MergeRequestrs-remove-open-for-scope
-rw-r--r--app/models/issue.rb1
-rw-r--r--app/models/merge_request.rb1
-rw-r--r--app/models/user.rb4
3 files changed, 0 insertions, 6 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 889f91d87ba..d39ae3a6c92 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -26,7 +26,6 @@ class Issue < ActiveRecord::Base
validates :project, presence: true
- scope :cared, ->(user) { where(assignee_id: user) }
scope :in_projects, ->(project_ids) { where(project_id: project_ids) }
scope :without_due_date, -> { where(due_date: nil) }
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index b71a9e17a93..d02fa308b9f 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -104,7 +104,6 @@ class MergeRequest < ActiveRecord::Base
scope :by_source_or_target_branch, ->(branch_name) do
where("source_branch = :branch OR target_branch = :branch", branch: branch_name)
end
- scope :cared, ->(user) { where('assignee_id = :user OR author_id = :user', user: user.id) }
scope :by_milestone, ->(milestone) { where(milestone_id: milestone) }
scope :of_projects, ->(ids) { where(target_project_id: ids) }
scope :from_project, ->(project) { where(source_project_id: project.id) }
diff --git a/app/models/user.rb b/app/models/user.rb
index 31e975b8e53..457ba05fb04 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -587,10 +587,6 @@ class User < ActiveRecord::Base
name.split.first unless name.blank?
end
- def cared_merge_requests
- MergeRequest.cared(self)
- end
-
def projects_limit_left
projects_limit - personal_projects.count
end