debian-mirror-gitlab/app/models/users/namespace_commit_email.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
350 B
Ruby
Raw Normal View History

2023-01-13 00:05:48 +05:30
# frozen_string_literal: true
module Users
class NamespaceCommitEmail < ApplicationRecord
belongs_to :user
belongs_to :namespace
belongs_to :email
validates :user, presence: true
validates :namespace, presence: true
validates :email, presence: true
validates :user_id, uniqueness: { scope: [:namespace_id] }
end
end