Class: Shoppy::Shipment

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/shoppy/shipment.rb

Direct Known Subclasses

Shipment

Instance Method Summary collapse

Instance Method Details

#order_linesObject

Relationships



4
# File 'app/models/shoppy/shipment.rb', line 4

has_many    :order_lines, dependent: :nullify

#statusObject

Validation



9
# File 'app/models/shoppy/shipment.rb', line 9

validates   :status,    inclusion: {:in => ["Processing", "Shipped", "Cancelled", "Delivered"], message: "Must be 'Processing', 'Shipped', 'Cancelled' or 'Delivered'"}