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

11 lines
245 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-10-15 14:42:47 +05:30
class TermAgreement < ActiveRecord::Base
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