Files
clientsflow/research/chatwoot/app/models/concerns/account_cache_revalidator.rb

12 lines
252 B
Ruby

module AccountCacheRevalidator
extend ActiveSupport::Concern
included do
after_commit :update_account_cache, on: [:create, :update, :destroy]
end
def update_account_cache
account.update_cache_key(self.class.name.underscore)
end
end