From 8a7fe29f6d2671df407f792bb02b90984ca8d1d8 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Mon, 18 Feb 2013 23:29:06 -0700 Subject: [PATCH] Changing lapsed member math to be more accurate & give more info --- app/models/user.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 33e63f3..b12a900 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -57,7 +57,7 @@ class User < ActiveRecord::Base 10 when 25..999 if self.payments.count > 0 then - if self.payments.last.date < (DateTime.now - 1.month) + if self.payments.last.date < (DateTime.now - 45.days) 3 else case self.member_level.to_i @@ -79,7 +79,7 @@ class User < ActiveRecord::Base case self.member_level.to_i when 0 if self.payments.count > 0 then - ":(" + ":(" else "" end @@ -89,8 +89,8 @@ class User < ActiveRecord::Base "" when 25..999 if self.payments.count > 0 then - if self.payments.last.date < (DateTime.now - 1.month) - "" + if self.payments.last.date < (DateTime.now - 45.days) + "" else case self.member_level.to_i when 25..49