1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Fix auto sync trigger logic and add tests

This commit is contained in:
Zach Gollwitzer 2025-05-13 16:14:29 -04:00
parent bebe7b40d6
commit bcb47a9d29
3 changed files with 50 additions and 3 deletions

View file

@ -34,6 +34,10 @@ module Syncable
latest_sync&.last_ran_at
end
def last_sync_created_at
latest_sync&.created_at
end
private
def latest_sync
syncs.order(created_at: :desc).first