lib/active_regulation/expiration.rb in active_regulation-2.2.6 vs lib/active_regulation/expiration.rb in active_regulation-2.3.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 < ?", Time.now) } - scope :unexpired, -> { where("expires_at IS NOT NULL AND expires_at >= ?", 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? end \ No newline at end of file