Module: BusinessFlow::Validations::ClassMethods

Defined in:
lib/business_flow/validations.rb

Overview

Additions to the DSL

Instance Method Summary collapse

Instance Method Details

#expects(field, options = {}) ⇒ Object

Declares that you expect to set this field during the course of processing, and that it should meet the given ActiveModel validations.



11
12
13
14
# File 'lib/business_flow/validations.rb', line 11

def expects(field, options = {})
  validates field, options
  ::BusinessFlow::DSL::Field.new(field).add_to(self)
end