otwarchive-symphonyarchive/app/models/stat_counter.rb
2026-03-11 22:22:11 +00:00

14 lines
281 B
Ruby

class StatCounter < ApplicationRecord
belongs_to :work
after_commit :enqueue_to_index, on: :update
def enqueue_to_index
IndexQueue.enqueue(self, :stats)
end
# Specify the indexer that should be used for this class
def indexers
[StatCounterIndexer]
end
end