aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/caching_with_rails.textile
diff options
context:
space:
mode:
authorManuel Menezes de Sequeira <MMSequeira@gmail.com>2011-10-06 21:31:26 +0100
committerManuel Menezes de Sequeira <MMSequeira@gmail.com>2011-10-06 21:31:26 +0100
commita17e5e24624d27467e3d7a52ff83c00140890557 (patch)
tree96ea19c3b0b23f0782910384c476d2662471ed73 /railties/guides/source/caching_with_rails.textile
parent29bf193cadae8c0b01f565caed75eb285ba8c958 (diff)
parent545ddbdbc5b61716fb884488206567a130902f0a (diff)
downloadrails-a17e5e24624d27467e3d7a52ff83c00140890557.tar.gz
rails-a17e5e24624d27467e3d7a52ff83c00140890557.tar.bz2
rails-a17e5e24624d27467e3d7a52ff83c00140890557.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: