The personal finance app for everyone (by everyone)
Ruby
fix(providers): move FioItem#destroy_later onto DestroyableLater (#3584)
Juan José Mata11628c54fa95
diff --git a/app/models/fio_item.rb b/app/models/fio_item.rbindex 04e81a692d..38f9d10957 100644--- a/app/models/fio_item.rb+++ b/app/models/fio_item.rb@@ -7,7 +7,7 @@# collection because the surrounding sync machinery (Family::Syncer, the setup flow,# Family::FinancialDataReset) is written against provider items with many accounts.class FioItem < ApplicationRecord- include Syncable, Provided, Unlinking, Encryptable+ include Syncable, Provided, Unlinking, Encryptable, DestroyableLaterenum :status, { good: "good", requires_update: "requires_update" }, default: :good@@ -37,12 +37,6 @@ class FioItem < ApplicationRecordscope :ordered, -> { order(created_at: :desc) }scope :needs_update, -> { where(status: :requires_update) }- # Mark the item for deletion and enqueue the background destroy job.- def destroy_later- update!(scheduled_for_deletion: true)- DestroyJob.perform_later(self)- end-# Run the importer to fetch the latest statement from Fio.def import_latest_fio_dataprovider = fio_provider