summaryrefslogtreecommitdiff
path: root/app/models/todo.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-24 10:48:50 -0700
committerStan Hu <stanhu@gmail.com>2019-06-24 10:49:13 -0700
commitf2d932268d1b30929e45d7503ef90b325a85e314 (patch)
treee506d96f45f96106cf492b5acba40960d321b662 /app/models/todo.rb
parent211a00473b78ada629d1c401ec443b766392185e (diff)
downloadgitlab-ce-f2d932268d1b30929e45d7503ef90b325a85e314.tar.gz
Rename Todos.with_api_entity_associations to with_entity_associationssh-optimize-todos-controller
Since this scope is used in both the controller and the API, we rename it to make it clear that it's used for both.
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r--app/models/todo.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb
index f1fc5e599eb..240c91da5b6 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -60,7 +60,7 @@ class Todo < ApplicationRecord
scope :for_type, -> (type) { where(target_type: type) }
scope :for_target, -> (id) { where(target_id: id) }
scope :for_commit, -> (id) { where(commit_id: id) }
- scope :with_api_entity_associations, -> { preload(:target, :author, :note, group: :route, project: [:route, { namespace: :route }]) }
+ scope :with_entity_associations, -> { preload(:target, :author, :note, group: :route, project: [:route, { namespace: :route }]) }
scope :joins_issue_and_assignees, -> { left_joins(issue: :assignees) }
state_machine :state, initial: :pending do