Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

355 B
Raw Blame
class DataCacheClearJob < ApplicationJob
  queue_as :low_priority

  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