Sha256: b840681ae9b359b53acf3bf1ef709a9d021abff6c30b11270ce4b18cbad8073f
Contents?: true
Size: 332 Bytes
Versions: 9
Compression:
Stored size: 332 Bytes
Contents
class NewsFeedSweeper < ActionController::Caching::Sweeper observe NewsFeed def after_save(record) Role.all.each do |role| expire_fragment(:controller => :news_feeds, :action => :index, :id => record.id, :page => 'title', :role => role.name) end end def after_destroy(record) after_save(record) end end
Version data entries
9 entries across 9 versions & 1 rubygems