diff options
author | James Lopez <james.lopez@vodafone.com> | 2015-11-11 15:42:27 +0000 |
---|---|---|
committer | James Lopez <james.lopez@vodafone.com> | 2015-11-11 15:42:27 +0000 |
commit | c6a0f109cd393e951f4d700b06490d819e6792ba (patch) | |
tree | ec1f42eb32ef8a8e8a047ba2b2788eea020c05d0 /app/models/group.rb | |
parent | 1b14bc59570a625365fef232f8c57919f76b3e2a (diff) | |
download | gitlab-ce-c6a0f109cd393e951f4d700b06490d819e6792ba.tar.gz |
refactored code as projects only have one owner. Kept some refactoring in place (has_owners concern)
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index c9806f6fd6f..9503d8b0f1c 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -22,7 +22,7 @@ class Group < Namespace include HasOwners has_many :group_members, dependent: :destroy, as: :source, class_name: 'GroupMember' - alias_method :my_members, :group_members + alias_method :members, :group_members has_many :users, through: :group_members validate :avatar_type, if: ->(user) { user.avatar.present? && user.avatar_changed? } @@ -91,10 +91,6 @@ class Group < Namespace add_user(user, Gitlab::Access::MASTER, current_user) end - def members - group_members - end - def avatar_type unless self.avatar.image? self.errors.add :avatar, "only images allowed" |