1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Feat: Data "reset" button (#1913)

* feat: Allow admins to delete family data

* feat: Allow self-hosting users to delete cached data

* Remove system tests
This commit is contained in:
Tony Vincent 2025-02-28 13:49:12 +01:00 committed by GitHub
parent f7064fd4dd
commit 8208722247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 206 additions and 16 deletions

View file

@ -0,0 +1,16 @@
class DataCacheClearJob < ApplicationJob
queue_as :default
def perform(family)
ActiveRecord::Base.transaction do
ExchangeRate.delete_all
Security::Price.delete_all
family.accounts.each do |account|
account.balances.delete_all
account.holdings.delete_all
end
family.sync_later
end
end
end