From c0d0ad85c766f48c30810391c9f5099a2b8c8084 Mon Sep 17 00:00:00 2001 From: dcordz <17937472+dcordz@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:57:35 -0500 Subject: [PATCH] botw-schedule - use _was https://stackoverflow.com/questions/607069/using-activerecord-is-there-a-way-to-get-the-old-values-of-a-record-during-afte in bill send notification callback --- app/models/bill.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/bill.rb b/app/models/bill.rb index 9505e63c..098efa39 100644 --- a/app/models/bill.rb +++ b/app/models/bill.rb @@ -208,7 +208,9 @@ def send_notifications_on_update end end + # _was + # https://stackoverflow.com/questions/607069/using-activerecord-is-there-a-way-to-get-the-old-values-of-a-record-during-afte def updated_scheduled_release_date_utc? - scheduled_release_date_utc == Time.zone.today && attribute_before_last_save("scheduled_release_date_utc") != Time.zone.today + scheduled_release_date_utc == Time.zone.today && scheduled_release_date_utc_was != Time.zone.today end end