Class: UltimaValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- UltimaValidator
- Defined in:
- app/validators/ultima_validator.rb
Constant Summary collapse
- TWO_REQUESTS_MSG =
'Batches must contain exactly two requests.'
- OT_RECIPE_CONSISTENT_MSG =
'OT Recipe must be the same for both requests.'
Class Method Summary collapse
-
.validation_info ⇒ Object
Used in _pipeline_limit.html to display custom validation warnings.
Instance Method Summary collapse
-
#validate(record) ⇒ Object
Validates that a batch contains the two requests.
Class Method Details
.validation_info ⇒ Object
Used in _pipeline_limit.html to display custom validation warnings
7 8 9 |
# File 'app/validators/ultima_validator.rb', line 7 def self.validation_info 'OT Recipe must be the same for both requests.' end |
Instance Method Details
#validate(record) ⇒ Object
Validates that a batch contains the two requests.
12 13 14 15 |
# File 'app/validators/ultima_validator.rb', line 12 def validate(record) validate_exactly_two_requests(record) requests_have_same_ot_recipe(record) end |