Advertisement
Guest User

Untitled

a guest
May 29th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. #scope
  2. scope :sold, where(state: 'sold')
  3. default_scope where(state: 'available')
  4.  
  5. #proc_object
  6. scope :sold, ->{ where(state: 'sold')}
  7. default_scope ->{ where(state: 'available')}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement