Method: Workflowable::Workflow#validate_action_options

Defined in:
app/models/workflowable/workflow.rb

#validate_action_options(options = {}, object, current_stage, next_stage, user) ⇒ Object



47
48
49
50
51
52
53
54
55
# File 'app/models/workflowable/workflow.rb', line 47

def validate_action_options(options={}, object, current_stage, next_stage, user)
    options ||= {}
    action_errors = {}
    actions.each do |action|
        errors = action.validate_options(options[action.name] || {}, self, object, current_stage, next_stage, user)
        action_errors[action.name] = errors if errors.present?
    end
    action_errors
end