debian-mirror-gitlab/app/models/user_canonical_email.rb
2020-04-22 19:07:51 +05:30

8 lines
248 B
Ruby

# frozen_string_literal: true
class UserCanonicalEmail < ApplicationRecord
validates :canonical_email, presence: true
validates :canonical_email, format: { with: Devise.email_regexp }
belongs_to :user, inverse_of: :user_canonical_email
end