aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-10-06 23:50:16 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-10-06 23:50:16 +0530
commit545ddbdbc5b61716fb884488206567a130902f0a (patch)
tree6667b627b1eb63f284e376229669127eade41fd1 /railties
parentd42d97d2e3f0bdef2163cc14daa181903e0b198d (diff)
downloadrails-545ddbdbc5b61716fb884488206567a130902f0a.tar.gz
rails-545ddbdbc5b61716fb884488206567a130902f0a.tar.bz2
rails-545ddbdbc5b61716fb884488206567a130902f0a.zip
fix an example
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/caching_with_rails.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/caching_with_rails.textile b/railties/guides/source/caching_with_rails.textile
index 19378d63ce..4273d0dd64 100644
--- a/railties/guides/source/caching_with_rails.textile
+++ b/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: