Module: Timescaledb::CounterCache::ClassMethods
- Defined in:
- lib/timescaledb/counter_cache.rb
Instance Method Summary collapse
Instance Method Details
#belongs_to_with_counter_cache(name, scope = nil, **options) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/timescaledb/counter_cache.rb', line 10 def belongs_to_with_counter_cache(name, scope = nil, **) if [:counter_cache] == :timescaledb || [:counter_cache].is_a?(Array) setup_timescaledb_counter_cache(name, ) .delete(:counter_cache) end belongs_to(name, scope, **) end |