summaryrefslogtreecommitdiff
path: root/app/models/term_agreement.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-25 10:55:53 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-04 13:52:55 +0200
commit82eeb72c8c03727540b902d40e7e657d0a5ecb4c (patch)
treeec09058c44f447d7f09290f54c6cd35ee24de9ac /app/models/term_agreement.rb
parent3d6d0a09b65f032bbe1bd5ad4736dd764195bbe1 (diff)
downloadgitlab-ce-82eeb72c8c03727540b902d40e7e657d0a5ecb4c.tar.gz
Add model to track users accepting agreements
Diffstat (limited to 'app/models/term_agreement.rb')
-rw-r--r--app/models/term_agreement.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/term_agreement.rb b/app/models/term_agreement.rb
new file mode 100644
index 00000000000..8458a231bbd
--- /dev/null
+++ b/app/models/term_agreement.rb
@@ -0,0 +1,6 @@
+class TermAgreement < ActiveRecord::Base
+ belongs_to :term, class_name: 'ApplicationSetting::Term'
+ belongs_to :user
+
+ validates :user, :term, presence: true
+end