Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r--app/models/todo.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb
index 456115872d1..1927b54510e 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -75,13 +75,13 @@ class Todo < ApplicationRecord
after_save :keep_around_commit, if: :commit_id
class << self
- # Returns all todos for the given group and its descendants.
+ # Returns all todos for the given group ids and their descendants.
#
- # group - A `Group` to retrieve todos for.
+ # group_ids - Group Ids to retrieve todos for.
#
# Returns an `ActiveRecord::Relation`.
- def for_group_and_descendants(group)
- groups = group.self_and_descendants
+ def for_group_ids_and_descendants(group_ids)
+ groups = Group.groups_including_descendants_by(group_ids)
from_union([
for_project(Project.for_group(groups)),