Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix an example

  • Loading branch information...
commit 545ddbdbc5b61716fb884488206567a130902f0a 1 parent d42d97d
@vijaydev vijaydev authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/guides/source/caching_with_rails.textile
View
2  railties/guides/source/caching_with_rails.textile
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.