debian-mirror-gitlab/app/models/term_agreement.rb

11 lines
244 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2019-05-18 00:54:41 +05:30
class TermAgreement < ApplicationRecord
2018-10-15 14:42:47 +05:30
belongs_to :term, class_name: 'ApplicationSetting::Term'
belongs_to :user
2018-11-08 19:23:39 +05:30
scope :accepted, -> { where(accepted: true) }
2018-10-15 14:42:47 +05:30
validates :user, :term, presence: true
end