Sha256: 1d46bea150fcd836189f60d7fe3a8a71d6f4203556b7749e454a566a77df7e70
Contents?: true
Size: 997 Bytes
Versions: 54
Compression:
Stored size: 997 Bytes
Contents
module Sipity # Throughout the workflow process, a processed entity may have numerous # states. class WorkflowState < ActiveRecord::Base self.table_name = 'sipity_workflow_states' belongs_to :workflow, class_name: 'Sipity::Workflow' has_many :originating_workflow_state_actions, dependent: :destroy, class_name: 'Sipity::WorkflowStateAction', foreign_key: :originating_workflow_state_id has_many :resulting_workflow_actions, dependent: :destroy, class_name: 'Sipity::WorkflowAction', foreign_key: :resulting_workflow_state_id # It is not acceptable to delete a WorkflowState if there are associated entities. has_many :entities, class_name: 'Sipity::Entity', dependent: :restrict_with_exception has_many :notifiable_contexts, dependent: :destroy, as: :scope_for_notification, class_name: 'Sipity::NotifiableContext' end end
Version data entries
54 entries across 54 versions & 1 rubygems