Skip to content

Instantly share code, notes, and snippets.

@yamamoto-febc
Created June 14, 2012 12:04
Show Gist options
  • Save yamamoto-febc/2929923 to your computer and use it in GitHub Desktop.
Save yamamoto-febc/2929923 to your computer and use it in GitHub Desktop.
JavaScriptMVC Introduction1 TestModel
steal('jquery/model', function(){
/**
* @class Sample.Models.Hoge
* @parent index
* @inherits jQuery.Model
* Wraps backend hoge services.
*/
$.Model('Sample.Models.Hoge',
/* @Static */
{
findAll: "/hoges.json",
findOne : "/hoges/{id}.json",
create : "/hoges.json",
update : "/hoges/{id}.json",
destroy : "/hoges/{id}.json"
},
/* @Prototype */
{});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment