diff options
author | Brendan Deere <brendan@stembolt.com> | 2016-10-06 14:18:23 -0700 |
---|---|---|
committer | Brendan Deere <brendan@stembolt.com> | 2016-10-06 14:39:40 -0700 |
commit | 83e252009d3505aaf189e3b370faa521ecd628bd (patch) | |
tree | 5dd2483159131f7b0fd35af52a566114a3f79206 /lib | |
parent | d6aa2f89d92eeb858b1fea4967005e5e02cac07b (diff) |
Reset successive skip count
When the subscription is processed its successive skip count should be
reset to 0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/solidus_subscriptions/processor.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/solidus_subscriptions/processor.rb b/lib/solidus_subscriptions/processor.rb index c035ecf..40ff35e 100644 --- a/lib/solidus_subscriptions/processor.rb +++ b/lib/solidus_subscriptions/processor.rb @@ -82,6 +82,7 @@ module SolidusSubscriptions def new_installments(user) subscriptions_by_id.fetch(user.id, []).map do |sub| ActiveRecord::Base.transaction do + sub.successive_skip_count = 0 sub.advance_actionable_date sub.cancel! if sub.pending_cancellation? sub.installments.create! |