cache_counter_helper.rb 194 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 module CacheCounterHelper def update_cache_counter(name, object, value) if object.present? object.send(name.to_s+'=', object.send(name) + value) object.save! end end end