Commit 56ea71a3 authored by James Lopez's avatar James Lopez

fixing rubocop - random code not related to the changes

parent e11bfa6b
......@@ -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,
email: {
strict_mode: true,
allow_nil: true
},
uniqueness: {
scope: [:source_type,
:source_id],
allow_nil: true }
allow_nil: true
}
scope :invite, -> { where(user_id: nil) }
scope :non_invite, -> { where("user_id IS NOT NULL") }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment