Module: Pipeline::BatchValidation
- Included in:
- Pipeline
- Defined in:
- app/models/pipeline/batch_validation.rb
Instance Method Summary collapse
Instance Method Details
#validation_of_batch(batch) ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/models/pipeline/batch_validation.rb', line 3 def validation_of_batch(batch) # Using throw and catch enables us to skip over the request validation without actually # having to know whether it was needed or not. catch(:no_requests_in_batch) do validation_of_requests(batch.requests) { || batch.errors.add(:requests, ) } end end |