summaryrefslogtreecommitdiff
path: root/app/models/user_custom_attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user_custom_attribute.rb')
-rw-r--r--app/models/user_custom_attribute.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/user_custom_attribute.rb b/app/models/user_custom_attribute.rb
new file mode 100644
index 00000000000..eff25b31f9b
--- /dev/null
+++ b/app/models/user_custom_attribute.rb
@@ -0,0 +1,6 @@
+class UserCustomAttribute < ActiveRecord::Base
+ belongs_to :user
+
+ validates :user_id, :key, :value, presence: true
+ validates :key, uniqueness: { scope: [:user_id] }
+end