Advertisement
niks123123

Untitled

Aug 28th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.25 KB | None | 0 0
  1. class BasketItem < ActiveRecord::Base
  2.   belongs_to :basket
  3.  
  4.   validates :basket_id, :seller_id, :gid, :brand, :vendor_code, :name, :cost, :delivery,
  5.             presence: true
  6.  
  7.   validates_uniqueness_of :basket_id, scope: [:seller_id, :gid]
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement