debian-mirror-gitlab/app/models/user_custom_attribute.rb
2018-11-18 11:00:15 +05:30

9 lines
205 B
Ruby

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