Skip to content

Instantly share code, notes, and snippets.

@thecountofzero
Created July 12, 2012 00:17
Show Gist options
  • Save thecountofzero/3094648 to your computer and use it in GitHub Desktop.
Save thecountofzero/3094648 to your computer and use it in GitHub Desktop.
Sublime Text 2 CanJS Model Snipper
<snippet>
<content><![CDATA[
steal('can/model', function(\$) {
can.Model("${1:namespace}", {
findAll : 'GET /${2:resource}',
findOne : 'GET /${2:resource}/{id}',
create : 'POST /${2:resource}',
update : 'PUT /${2:resource}/{id}',
destroy : 'DELETE /${2:resource}/{id}'
}, {});
});
]]></content>
<tabTrigger>canmodel</tabTrigger>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment