fixed EduSetting删除时清除缓存

This commit is contained in:
xxq250 2024-11-19 10:29:50 +08:00
parent 61098942f7
commit de71b5e192
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@
class EduSetting < ApplicationRecord class EduSetting < ApplicationRecord
after_commit :expire_value_cache after_commit :expire_value_cache, on: [:create, :update]
after_destroy :clear_value_cache after_commit :clear_value_cache, on: :destroy
scope :by_search, -> (keyword){ where("name LIKE :keyword OR value LIKE :keyword", keyword: "%#{strip_param(keyword)}%") unless strip_param(keyword).blank? } scope :by_search, -> (keyword){ where("name LIKE :keyword OR value LIKE :keyword", keyword: "%#{strip_param(keyword)}%") unless strip_param(keyword).blank? }