module Counter::Cache
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
# File lib/counter/cache.rb, line 15 def self.configuration @configuration ||= Counter::Cache::Config.new end
configure() { |configuration| ... }
click to toggle source
# File lib/counter/cache.rb, line 11 def self.configure yield configuration end
included(base)
click to toggle source
# File lib/counter/cache.rb, line 19 def self.included(base) base.instance_eval do def counter_cache_on(options) after_create ActiveRecordUpdater.new(options) after_destroy ActiveRecordUpdater.new(options) end end end
Public Instance Methods
counter_cache_on(options)
click to toggle source
# File lib/counter/cache.rb, line 21 def counter_cache_on(options) after_create ActiveRecordUpdater.new(options) after_destroy ActiveRecordUpdater.new(options) end