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

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

13 lines
265 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
module Users
class BannedUser < ApplicationRecord
self.primary_key = :user_id
belongs_to :user
validates :user, presence: true
validates :user_id, uniqueness: { message: _("banned user already exists") }
end
end