Method: ActiveRecord::ConnectionAdapters::QueryCache.dirties_query_cache
- Defined in:
- lib/active_record/connection_adapters/abstract/query_cache.rb
.dirties_query_cache(base, *method_names) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/active_record/connection_adapters/abstract/query_cache.rb', line 9 def dirties_query_cache(base, *method_names) method_names.each do |method_name| base.class_eval <<-end_code, __FILE__, __LINE__ + 1 def #{method_name}(*) # def update_with_query_dirty(*args) clear_query_cache if @query_cache_enabled # clear_query_cache if @query_cache_enabled super # update_without_query_dirty(*args) end # end end_code end end |