diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-06 23:50:16 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-06 23:50:16 +0530 |
commit | 545ddbdbc5b61716fb884488206567a130902f0a (patch) | |
tree | 6667b627b1eb63f284e376229669127eade41fd1 /railties/guides/source | |
parent | d42d97d2e3f0bdef2163cc14daa181903e0b198d (diff) | |
download | rails-545ddbdbc5b61716fb884488206567a130902f0a.tar.gz rails-545ddbdbc5b61716fb884488206567a130902f0a.tar.bz2 rails-545ddbdbc5b61716fb884488206567a130902f0a.zip |
fix an example
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/caching_with_rails.textile | 2 |
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: |