Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made the expire_cache method have some default entries for RESTful ro…

…utes (because the rails documentation suggests passing :controller => 'blah', :action => 'blah' etc and it doesn't work so good...
  • Loading branch information...
commit 7116f14b9ec6f367ba1a03278317405fb72dc265 1 parent 1360bb4
@bjeanes bjeanes authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 Snippets/Create sweeper class.tmSnippet
View
5 Snippets/Create sweeper class.tmSnippet
@@ -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/})
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.