diff options
author | tauriedavis <taurie@gitlab.com> | 2018-05-26 02:17:57 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-06-04 23:22:11 +0300 |
commit | 285ffb223896f2226531be2ba10933414194155c (patch) | |
tree | cd6faec94ab2e4f65b0ed48f458b580b2853fac9 /app/models/term_agreement.rb | |
parent | 35ba75f6b93c77f078ab2cf538a256f8aa534eb3 (diff) |
Messaging on terms page when user already accepted
We show a blue flash banner if the user already accepted, and show a
button allowing them to continue to the application.
Diffstat (limited to 'app/models/term_agreement.rb')
-rw-r--r-- | app/models/term_agreement.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/term_agreement.rb b/app/models/term_agreement.rb index 8458a231bbd..c317bd0c90b 100644 --- a/app/models/term_agreement.rb +++ b/app/models/term_agreement.rb @@ -2,5 +2,7 @@ class TermAgreement < ActiveRecord::Base belongs_to :term, class_name: 'ApplicationSetting::Term' belongs_to :user + scope :accepted, -> { where(accepted: true) } + validates :user, :term, presence: true end |