mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fixed typo
This commit is contained in:
@@ -214,19 +214,19 @@ sweeper such as the following:
|
||||
[source, ruby]
|
||||
-----------------------------------------------------
|
||||
class StoreSweeper < ActionController::Caching::Sweeper
|
||||
observe Product # This sweeper is going to keep an eye on the Post model
|
||||
observe Product # This sweeper is going to keep an eye on the Product model
|
||||
|
||||
# If our sweeper detects that a Post was created call this
|
||||
# If our sweeper detects that a Product was created call this
|
||||
def after_create(product)
|
||||
expire_cache_for(product)
|
||||
end
|
||||
|
||||
# If our sweeper detects that a Post was updated call this
|
||||
# If our sweeper detects that a Product was updated call this
|
||||
def after_update(product)
|
||||
expire_cache_for(product)
|
||||
end
|
||||
|
||||
# If our sweeper detects that a Post was deleted call this
|
||||
# If our sweeper detects that a Product was deleted call this
|
||||
def after_destroy(product)
|
||||
expire_cache_for(product)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user