Guest User

Untitled

a guest
Jan 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class Game < ActiveRecord::Base
  2.  
  3. belongs_to :team
  4.  
  5. scope :future, lambda { where("starts_at > ?", Time.zone.now ) }
  6. scope :past, lambda { where("starts_at < ?", Time.zone.now ) }
  7.  
  8. end
Add Comment
Please, Sign In to add comment