mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix an example
This commit is contained in:
parent
d42d97d2e3
commit
545ddbdbc5
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ end
|
|||
You may notice that the actual product gets passed to the sweeper, so if we were caching the edit action for each product, we could add an expire method which specifies the page we want to expire:
|
||||
|
||||
<ruby>
|
||||
expire_action(:controller => 'products', :action => 'edit', :id => product)
|
||||
expire_action(:controller => 'products', :action => 'edit', :id => product.id)
|
||||
</ruby>
|
||||
|
||||
Then we add it to our controller to tell it to call the sweeper when certain actions are called. So, if we wanted to expire the cached content for the list and edit actions when the create action was called, we could do the following:
|
||||
|
|
Loading…
Reference in a new issue