Sha256: 9006366e843c6617bc227d61af1f1092486baa75afd2c573386012893f89203d
Contents?: true
Size: 439 Bytes
Versions: 1
Compression:
Stored size: 439 Bytes
Contents
module Cachers module Concern extend ActiveSupport::Concern include Delegation included do after_commit :cache, on: :create after_commit :recache, on: :update after_commit :uncache, on: :destroy end def cacher @cacher ||= self.class.cacher.new(self) end module ClassMethods include Delegation def cacher "#{name}Cacher".constantize end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cachers-4.1.0.2 | lib/cachers/concern.rb |