summaryrefslogtreecommitdiff
path: root/app/models/members
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-05-12 23:42:06 -0500
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-05-12 23:42:06 -0500
commiteb88ca76469539431b7f06592f177a77d5738612 (patch)
treeacfef46fb6d3c3313fa152ece9240ef3570a2ce8 /app/models/members
parent74511b049743cf543694bb92a8acd7e7586e533d (diff)
downloadgitlab-ce-eb88ca76469539431b7f06592f177a77d5738612.tar.gz
Rename methods that conflict in Rails 5.255583-rename-method-conflicts
Adds suffix to enum methods and changes `in_groups` to `of_groups`
Diffstat (limited to 'app/models/members')
-rw-r--r--app/models/members/group_member.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb
index b266c61f002..4cba69069bb 100644
--- a/app/models/members/group_member.rb
+++ b/app/models/members/group_member.rb
@@ -12,7 +12,7 @@ class GroupMember < Member
validates :source_type, format: { with: /\ANamespace\z/ }
default_scope { where(source_type: SOURCE_TYPE) }
- scope :in_groups, ->(groups) { where(source_id: groups.select(:id)) }
+ scope :of_groups, ->(groups) { where(source_id: groups.select(:id)) }
scope :count_users_by_group_id, -> { joins(:user).group(:source_id).count }