Method: Wf::Guard#validate_exp_and_fieldable

Defined in:
app/models/wf/guard.rb

#validate_exp_and_fieldableObject



95
96
97
98
99
100
101
102
# File 'app/models/wf/guard.rb', line 95

def validate_exp_and_fieldable
  if fieldable && exp.present?
    errors.add(:exp, "Exp and Fieldable can not be set at the same time.")
    return
  end

  errors.add(:exp, "Must set one of Exp and Fieldable.") unless fieldable || exp.present?
end