Class: FavoriteSweeper

Inherits:
ActionController::Caching::Sweeper
  • Object
show all
Defined in:
app/controllers/favorite_sweeper.rb

Instance Method Summary collapse

Instance Method Details

#after_create(favorite) ⇒ Object



4
5
6
# File 'app/controllers/favorite_sweeper.rb', line 4

def after_create(favorite)
  expire_cache_for(favorite)
end

#after_destroy(favorite) ⇒ Object



8
9
10
# File 'app/controllers/favorite_sweeper.rb', line 8

def after_destroy(favorite)
  expire_cache_for(favorite)
end