Sha256: 4313ff178d5898f9eb373375eec2e740c2d554bff8951b22ec9ba4d4420f1fe1
Contents?: true
Size: 562 Bytes
Versions: 3
Compression:
Stored size: 562 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gdpr_rails-0.3.3 | app/models/policy_manager/user_term.rb |
gdpr_rails-0.3.2 | app/models/policy_manager/user_term.rb |
gdpr_rails-0.3.1 | app/models/policy_manager/user_term.rb |