Class: FlowCore::Branch
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- FlowCore::Branch
- Defined in:
- app/models/flow_core/branch.rb
Instance Method Summary collapse
Instance Method Details
#arc_guard_attachable? ⇒ Boolean
32 33 34 |
# File 'app/models/flow_core/branch.rb', line 32 def arc_guard_attachable? !fallback_branch? && step.branch_arc_guard_attachable? end |
#copy_arc_guards_to(arc) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'app/models/flow_core/branch.rb', line 36 def copy_arc_guards_to(arc) return unless arc_guard_attachable? arc_guards.find_each do |arc_guard| new_guard = arc_guard.dup new_guard.arc = arc new_guard.pipeline = nil new_guard.branch = nil new_guard.save! end end |
#user_destroyable? ⇒ Boolean
28 29 30 |
# File 'app/models/flow_core/branch.rb', line 28 def user_destroyable? !fallback_branch || (fallback_branch? && !step.fallback_branch_required?) end |