gitlab-org--gitlab-foss/app/models/user_custom_attribute.rb
2018-07-26 16:55:41 -07:00

8 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