Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7116f14b9e
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (29 sloc) 0.827 kb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>class ${1:Model}Sweeper < ActionController::Caching::Sweeper
observe ${1:Model}
def after_save(${1/./\l$0/})
expire_cache(${1/./\l$0/})
end
def after_destroy(${1/./\l$0/})
expire_cache(${1/./\l$0/})
end
private
def expire_cache(${1/./\l$0/})
${0:expire_page ${1/./\l$0/}s_path
expire_page ${1/./\l$0/}_path(${1/./\l$0/})}
end
end</string>
<key>name</key>
<string>Create sweeper class</string>
<key>scope</key>
<string>source.ruby</string>
<key>tabTrigger</key>
<string>sweeper</string>
<key>uuid</key>
<string>FF022038-CA5D-4045-909E-BF509343A5C7</string>
</dict>
</plist>
Jump to Line
Something went wrong with that request. Please try again.