discourse-solved/app/lib/category_extension.rb

14 lines
315 B
Ruby
Raw Normal View History

2024-03-05 06:14:32 -05:00
# frozen_string_literal: true
module DiscourseSolved::CategoryExtension
extend ActiveSupport::Concern
prepended { after_save :reset_accepted_cache, if: -> { SiteSetting.solved_enabled? } }
private
def reset_accepted_cache
::DiscourseSolved::AcceptedAnswerCache.reset_accepted_answer_cache
end
end