tap/app/models/order.rb
2014-11-10 22:57:37 +01:00

6 lines
171 B
Ruby

class Order < ActiveRecord::Base
belongs_to :user
default_scope -> { order('created_at DESC') }
validates :products, presence: true, length: { maximum: 140 }
end