Sha256: 28ae48d491706394082dbe756c17459fc0d93858389af1c9fad6881a12198642
Contents?: true
Size: 558 Bytes
Versions: 1
Compression:
Stored size: 558 Bytes
Contents
require "aasm" module PolicyManager class UserTerm < ApplicationRecord include AASM belongs_to :user, class_name: Config.user_resource.to_s belongs_to :term validates_uniqueness_of :term_id, :scope => :user_id aasm :column => :state do state :passive, :initial => true state :rejected state :accepted event :accept do transitions from: [:passive, :rejected], to: :accepted end event :reject do transitions from: [:passive, :accepted], to: :rejected end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gdpr_rails-0.3.4 | app/models/policy_manager/user_term.rb |