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