diff --git a/app/models/my_module_status.rb b/app/models/my_module_status.rb index 101606c40..c35506760 100644 --- a/app/models/my_module_status.rb +++ b/app/models/my_module_status.rb @@ -47,6 +47,14 @@ class MyModuleStatus < ApplicationRecord ordered_statuses end + def conditions_fulfilled?(my_module) + my_module_status_conditions.each do |condition| + condition.call(my_module) + end + + my_module.errors.blank? + end + private def next_in_same_flow