Class: ReviewSweeper

Inherits:
ActionController::Caching::Sweeper
  • Object
show all
Defined in:
app/models/review_sweeper.rb

Instance Method Summary collapse

Instance Method Details

#after_create(review) ⇒ Object



3
4
5
# File 'app/models/review_sweeper.rb', line 3

def after_create(review)
  expire_cache_for(review)
end

#after_destroy(review) ⇒ Object



11
12
13
# File 'app/models/review_sweeper.rb', line 11

def after_destroy(review)
  expire_cache_for(review)
end

#after_update(review) ⇒ Object



7
8
9
# File 'app/models/review_sweeper.rb', line 7

def after_update(review)
  expire_cache_for(review)
end