app/services/order_purchase_validator.rb
# The AllOrderDetailsValidator will validate each individual OrderDetail
# within the order using the NotePresenceValidator.
The AllOrderDetailsValidator will validate each individual OrderDetail
within the order using the NotePresenceValidator.
The AllOrderDetailsValidator will validate each individual OrderDetail within the order using the NotePresenceValidator .
def valid?
    additional_validations.all? do |validator_class|
      validator = validator_class.new(@order_details)
      if validator.valid?
        true
      else
        @errors << validator.error_message
        false
      end
    end
  end
def valid? additional_validations . all? do | validator_class | validator = validator_class . new ( @order_details ) if validator . valid? true else @errors << validator . error_message false end end end
The AllOrderDetailsValidator will validate each individual OrderDetail
within the order using the NotePresenceValidator.
The AllOrderDetailsValidator will validate each individual OrderDetail within the order using the NotePresenceValidator .