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-12-16 22:33:55 +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