fixed EduSetting删除时清除缓存after_destroy
This commit is contained in:
		
							parent
							
								
									8b968d3f1a
								
							
						
					
					
						commit
						61098942f7
					
				| 
						 | 
					@ -17,7 +17,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EduSetting < ApplicationRecord
 | 
					class EduSetting < ApplicationRecord
 | 
				
			||||||
  after_commit :expire_value_cache
 | 
					  after_commit :expire_value_cache
 | 
				
			||||||
  after_commit :clear_value_cache, on: :destroy
 | 
					  after_destroy :clear_value_cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  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? }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue