Skip to content

Commit

Permalink
botw-schedule - use <attribute>_was https://stackoverflow.com/questio…
Browse files Browse the repository at this point in the history
  • Loading branch information
dcordz committed Nov 14, 2024
1 parent c15fe62 commit c0d0ad8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/bill.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ def send_notifications_on_update
end
end

# <attribute>_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

0 comments on commit c0d0ad8

Please sign in to comment.