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
path: root/app
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-07-04 12:13:50 +0300
committerDouwe Maan <douwe@gitlab.com>2019-07-04 12:13:50 +0300
commitae7041d4dae5650172858ec86bcb6ca92ec4512a (patch)
tree2065d0ad82f77585295a1749dcfe49f977ea14b8 /app
parent97b2a3cc7c3fab546c60229c9d058fa1472724ac (diff)
Backports for EE's "Allow adding groups to CODEOWNERS file"
Some general code has been added/removed in EE version which needs to be backported in CE
Diffstat (limited to 'app')
-rw-r--r--app/models/group.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index 8e89c7ecfb1..9520db1bc0a 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -63,6 +63,8 @@ class Group < Namespace
after_save :update_two_factor_requirement
after_update :path_changed_hook, if: :saved_change_to_path?
+ scope :with_users, -> { includes(:users) }
+
class << self
def sort_by_attribute(method)
if method == 'storage_size_desc'