|
|
|
@ -315,8 +315,8 @@ class Scheme < ApplicationRecord
|
|
|
|
|
scheme_deactivation_periods.deactivations_without_reactivation.first |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def last_deactivation_before(date) |
|
|
|
|
scheme_deactivation_periods.where("deactivation_date <= ?", date).order("created_at").last |
|
|
|
|
def soonest_reactivation(date) |
|
|
|
|
scheme_deactivation_periods.deactivations_with_reactivation.where(date < reactivation_date).order(reactivation_date).first |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def last_deactivation_date |
|
|
|
|