tap/app/models/order.rb

9 lines
181 B
Ruby
Raw Normal View History

2014-11-09 22:53:39 +01:00
class Order < ActiveRecord::Base
2014-11-23 21:12:31 +01:00
belongs_to :users
has_many :order_products
has_many :products, through: :order_products
2014-11-10 22:57:37 +01:00
default_scope -> { order('created_at DESC') }
2014-11-25 02:01:57 +01:00
2014-11-09 22:53:39 +01:00
end