lib/subscription.rb
# sets the expiration for the subscription based on today and the configured grace period.
sets the expiration for the subscription based on today and the configured grace period.
sets the expiration for the subscription based on today and the configured grace period .
def expire_after_grace!
    self.expire_on = [Date.today, paid_through].max + Freemium.days_grace
    Freemium.activity_log[self] << "now set to expire on #{self.expire_on}" if Freemium.log?
    Freemium.mailer.deliver_expiration_warning(subscribable, self)
    save!
  end
def expire_after_grace! self . expire_on = [ Date . today , paid_through ] . max + Freemium . days_grace Freemium . activity_log [ self ] << "now set to expire on #{self.expire_on}" if Freemium . log? Freemium . mailer . deliver_expiration_warning ( subscribable , self ) save! end
sets the expiration for the subscription based on today and the configured grace period.
sets the expiration for the subscription based on today and the configured grace period .