2014-11-09 22:53:39 +01:00
|
|
|
class Order < ActiveRecord::Base
|
|
|
|
belongs_to :user
|
2014-11-10 22:57:37 +01:00
|
|
|
|
|
|
|
default_scope -> { order('created_at DESC') }
|
2014-11-10 02:30:42 +01:00
|
|
|
validates :products, presence: true, length: { maximum: 140 }
|
2014-11-09 22:53:39 +01:00
|
|
|
end
|