tap/app/models/order.rb
2014-11-25 14:27:27 +01:00

8 lines
181 B
Ruby

class Order < ActiveRecord::Base
belongs_to :users
has_many :order_products
has_many :products, through: :order_products
default_scope -> { order('created_at DESC') }
end