Consider nil in price expire time as effective

#522
This commit is contained in:
Artur Beljajev 2017-06-03 23:12:16 +03:00
parent 8916eee169
commit f76e1259fc
11 changed files with 106 additions and 65 deletions

View file

@ -2,10 +2,6 @@ module Concerns::Billing::Price::Expirable
extend ActiveSupport::Concern
class_methods do
def unexpired
where("#{attribute_alias(:expire_time)} >= ?", Time.zone.now)
end
def expired
where("#{attribute_alias(:expire_time)} < ?", Time.zone.now)
end