debian-mirror-gitlab/app/models/user_custom_attribute.rb
2019-07-07 11:18:12 +05:30

9 lines
204 B
Ruby

# frozen_string_literal: true
class UserCustomAttribute < ApplicationRecord
belongs_to :user
validates :user_id, :key, :value, presence: true
validates :key, uniqueness: { scope: [:user_id] }
end