Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -203,6 +203,7 @@ module ActsAsChargeable | ... | @@ -203,6 +203,7 @@ module ActsAsChargeable |
| 203 | end | 203 | end |
| 204 | 204 | ||
| 205 | def var_expired_by(time) | 205 | def var_expired_by(time) |
| 206 | + return false unless var_payment_expires_at | ||
| 206 | return var_payment_expires_at + time < Time.zone.now && !var_payed? | 207 | return var_payment_expires_at + time < Time.zone.now && !var_payed? |
| 207 | end | 208 | end |
| 208 | 209 | ||
| ... | @@ -222,4 +223,4 @@ end | ... | @@ -222,4 +223,4 @@ end |
| 222 | 223 | ||
| 223 | if defined? ActiveRecord::Base | 224 | if defined? ActiveRecord::Base |
| 224 | ActiveRecord::Base.send(:include, ActsAsChargeable) | 225 | ActiveRecord::Base.send(:include, ActsAsChargeable) |
| 225 | -end | 226 | +end |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment