#START:has_many
class Order < ActiveRecord::Base

  has_many :line_items

#END:has_many

#START:select
  PAYMENT_TYPES = [
    [ "Chèque",          "check" ], 
    [ "Carte de crédit",    "cc"    ],
    [ "Bon de commande", "po"    ]
  ].freeze       # freeze transforme le tableau en constante
#END:select

#START:validates
  validates_presence_of :name, :email, :address, :pay_type
#END:validates

#START:has_many
end
#END:has_many
