Module: BusinessFlow::Validations::ClassMethods
- Defined in:
- lib/business_flow/validations.rb
Overview
Additions to the DSL
Instance Method Summary collapse
-
#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.
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.
9 10 11 12 |
# File 'lib/business_flow/validations.rb', line 9 def expects(field, = {}) validates field, .merge(on: field) ::BusinessFlow::DSL::Field.new(field).add_to(self) end |