Guest User

Untitled

a guest
Oct 11th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.16 KB | None | 0 0
  1. attr_accessible :due_at
  2.  
  3. def self.due_on(date)
  4.   date.to_time_in_current_zone
  5.   range = date.beginning_of_day..date.end_of_day
  6.   where(due_at :range)
  7. end
Add Comment
Please, Sign In to add comment