Module: CouponsHelper

Defined in:
app/helpers/coupons_helper.rb

Instance Method Summary collapse

Instance Method Details

#days_until_expirationObject



2
3
4
5
6
7
8
# File 'app/helpers/coupons_helper.rb', line 2

def days_until_expiration
  if session[:coupon_name] && @coupon ||= Coupon.find_by_name(session[:coupon_name])
    @coupon.free_months * 30
  else
    Saucy::Configuration.trial_length
  end
end