Commit e4ce5595 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

reactivated: acceptance from resigned to accepted gets resigned_at nil

parent 6f96106a
Pipeline #38168 failed with stage
in 35 minutes and 23 seconds
......@@ -26,8 +26,12 @@ module AcceptanceAttributes
def record_acceptance_change
return unless new_record? || will_save_change_to_acceptance?
return unless new_record? || will_save_change_to_attribute?(:acceptance)
# reactivated volunteers shouldn't look resigned, because having resigned_at date
if will_save_change_to_attribute?(:acceptance, from: 'resigned', to: 'accepted')
self.resigned_at = nil
self["#{acceptance}_at".to_sym] =
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment