Sha256: 80a0ae0eebac8b498a2c498e5c655aa8c4242ac6267bc0abae20a46dc239ecb5
Contents?: true
Size: 255 Bytes
Versions: 9
Compression:
Stored size: 255 Bytes
Contents
class UserSweeper < ActionController::Caching::Sweeper observe User def after_update(item) expire(item) end def after_destroy(item) expire(item) end private def expire(item=nil) expire_fragment(%r{/users/#{item.id}*}) end end
Version data entries
9 entries across 9 versions & 2 rubygems