2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-28 09:17:42 -04:00
|
|
|
class TermAgreement < ApplicationRecord
|
2018-04-25 04:55:53 -04:00
|
|
|
belongs_to :term, class_name: 'ApplicationSetting::Term'
|
|
|
|
belongs_to :user
|
|
|
|
|
2018-05-25 19:17:57 -04:00
|
|
|
scope :accepted, -> { where(accepted: true) }
|
|
|
|
|
2018-04-25 04:55:53 -04:00
|
|
|
validates :user, :term, presence: true
|
|
|
|
end
|