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