Guest User

Untitled

a guest
May 27th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. has_one :active_sale,
  2. lambda {
  3. {:class_name => 'Sale',
  4. :conditions => "sales.starts < '#{Time.now.to_formatted_s(:db)}' AND sales.ends > '#{Time.now.to_formatted_s(:db)}'"}
  5. }
Add Comment
Please, Sign In to add comment