summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/member.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/models/member.rb b/app/models/member.rb
index a7c599b3598..eed9f2537e9 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -35,11 +35,15 @@ class Member < ActiveRecord::Base
allow_nil: true }
validates :access_level, inclusion: { in: Gitlab::Access.all_values }, presence: true
validates :invite_email, presence: { if: :invite? },
- email: { strict_mode: true,
- allow_nil: true },
- uniqueness: { scope: [:source_type,
- :source_id],
- allow_nil: true }
+ email: {
+ strict_mode: true,
+ allow_nil: true
+ },
+ uniqueness: {
+ scope: [:source_type,
+ :source_id],
+ allow_nil: true
+ }
scope :invite, -> { where(user_id: nil) }
scope :non_invite, -> { where("user_id IS NOT NULL") }