aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/caching_with_rails.textile
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-10-07 22:20:29 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-10-07 22:20:29 +0530
commit4930f9d2a76c0b4a8f60efa72ade0b9cce3520b6 (patch)
treef1ed80653c6bcb3d89527e71f50b67799b6e4bd9 /railties/guides/source/caching_with_rails.textile
parent9312d217d6233710b291dab2d4edde483109e136 (diff)
parentcb244f4f70dbc22813e78e58f6a63392462417f7 (diff)
downloadrails-4930f9d2a76c0b4a8f60efa72ade0b9cce3520b6.tar.gz
rails-4930f9d2a76c0b4a8f60efa72ade0b9cce3520b6.tar.bz2
rails-4930f9d2a76c0b4a8f60efa72ade0b9cce3520b6.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/guides/source/caching_with_rails.textile')
-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: