user_custom_attribute.rb 174 Bytes EditWeb IDE 1 2 3 4 5 6 class UserCustomAttribute < ActiveRecord::Base belongs_to :user validates :user_id, :key, :value, presence: true validates :key, uniqueness: { scope: [:user_id] } end