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:
parent
bebe7b40d6
commit
bcb47a9d29
3 changed files with 50 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue