mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-24 17:27:50 -05:00
16 lines
259 B
Ruby
16 lines
259 B
Ruby
class CommentSweeper < ActionController::Caching::Sweeper
|
|
observe Comment
|
|
|
|
def after_create(comment)
|
|
expire_fragment('recent_posts')
|
|
end
|
|
|
|
def after_update(comment)
|
|
end
|
|
|
|
def after_destroy(comment)
|
|
expire_fragment('recent_posts')
|
|
end
|
|
|
|
end
|