diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 16:35:08 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:32:42 -0600 |
commit | b3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44 (patch) | |
tree | e73552a1d8f27dd510e0bde264b6d24648fc2bfc /app/models/member.rb | |
parent | 0a5b670a9392f7f8c02e83f1c2e3ed4d2d67cfde (diff) | |
download | gitlab-ce-b3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44.tar.gz |
Move up delegate calls
Diffstat (limited to 'app/models/member.rb')
-rw-r--r-- | app/models/member.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/member.rb b/app/models/member.rb index 2ea4abacea4..f198fbe9056 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -10,6 +10,8 @@ class Member < ActiveRecord::Base belongs_to :user belongs_to :source, polymorphic: true + delegate :name, :username, :email, to: :user, prefix: true + validates :user, presence: true, unless: :invite? validates :source, presence: true validates :user_id, uniqueness: { scope: [:source_type, :source_id], @@ -73,8 +75,6 @@ class Member < ActiveRecord::Base after_destroy :post_destroy_hook, unless: :pending? after_commit :refresh_member_authorized_projects - delegate :name, :username, :email, to: :user, prefix: true - default_value_for :notification_level, NotificationSetting.levels[:global] class << self |