Skip to content

Commit

Permalink
Made the expire_cache method have some default entries for RESTful ro…
Browse files Browse the repository at this point in the history
…utes (because the rails documentation suggests passing :controller => 'blah', :action => 'blah' etc and it doesn't work so good...
  • Loading branch information
bjeanes committed Aug 28, 2008
1 parent 1360bb4 commit 7116f14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Snippets/Create sweeper class.tmSnippet
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>class ${1:Model}Sweeper &lt; ActionController::Caching::Sweeper
<string>class ${1:Model}Sweeper < ActionController::Caching::Sweeper
observe ${1:Model}
def after_save(${1/./\l$0/})
Expand All @@ -17,7 +17,8 @@
private
def expire_cache(${1/./\l$0/})
$0
${0:expire_page ${1/./\l$0/}s_path
expire_page ${1/./\l$0/}_path(${1/./\l$0/})}
end
end</string>
Expand Down

0 comments on commit 7116f14

Please sign in to comment.