Sha256: 635296e4faabf61fdc94909ff76abffa5d8cacb2d49c69fec884c5bf7c93c9f8

Contents?: true

Size: 322 Bytes

Versions: 1

Compression:

Stored size: 322 Bytes

Contents

class ReRuleExpectedOutcome < ActiveRecord::Base
  belongs_to :re_rule

  validates_associated  :re_rule
  validates_presence_of :outcome  

  def validate    
    if outcome == RulesEngine::Rule::Outcome::START_WORKFLOW && workflow_code.blank?
      errors.add(:workflow_code, "workflow code required")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rules_engine-0.1.4 rails_generators/templates/app/models/re_rule_expected_outcome.rb