lib/active_regulation/expiration.rb in active_regulation-2.4.0 vs lib/active_regulation/expiration.rb in active_regulation-3.0.0
- old
+ new
@@ -3,11 +3,11 @@
module ActiveRegulation
module Expiration
extend ActiveSupport::Concern
included do
- scope :expired, -> { where("expires_at IS NULL OR expires_at < ?".freeze, Time.now) }
+ scope :expired, -> { where("expires_at IS NULL OR expires_at < ?".freeze, Time.now) }
scope :unexpired, -> { where("expires_at IS NOT NULL AND expires_at >= ?".freeze, Time.now) }
end
def expire!
update(expires_at: nil) unless expires_at.nil?
@@ -44,6 +44,6 @@
time.is_a?(Integer) ? (DateTime.now + time) : time
end
end
-end
\ No newline at end of file
+end