提交 56ea71a3 编写于 作者: J James Lopez

fixing rubocop - random code not related to the changes

上级 e11bfa6b
...@@ -35,11 +35,15 @@ class Member < ActiveRecord::Base ...@@ -35,11 +35,15 @@ class Member < ActiveRecord::Base
allow_nil: true } allow_nil: true }
validates :access_level, inclusion: { in: Gitlab::Access.all_values }, presence: true validates :access_level, inclusion: { in: Gitlab::Access.all_values }, presence: true
validates :invite_email, presence: { if: :invite? }, validates :invite_email, presence: { if: :invite? },
email: { strict_mode: true, email: {
allow_nil: true }, strict_mode: true,
uniqueness: { scope: [:source_type, allow_nil: true
:source_id], },
allow_nil: true } uniqueness: {
scope: [:source_type,
:source_id],
allow_nil: true
}
scope :invite, -> { where(user_id: nil) } scope :invite, -> { where(user_id: nil) }
scope :non_invite, -> { where("user_id IS NOT NULL") } scope :non_invite, -> { where("user_id IS NOT NULL") }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册