fixing rubocop - random code not related to the changes

This commit is contained in:
James Lopez 2015-11-12 12:29:01 +00:00
parent e11bfa6b86
commit 56ea71a3b1
1 changed files with 9 additions and 5 deletions

View File

@ -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") }