mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-06 15:40:31 +08:00
Add conditions_fulfilled? method
This commit is contained in:
parent
4c1e120f23
commit
8b1e11a314
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue