Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : ajax call to database example

$
0
0
So, for the cookbook example... would I modify the /cookbook/models/recipe.js to look like this?  And then somehow plugin the ajax call?

...
$.Model('Cookbook.Models.Recipe',
/* @Static */
{
    findAll :
        $.get('/recipes',{
          order: ['name ASC']
        }),
      findOne : "/recipes/{id}.json",
      create : "/recipes.json",
     update : "/recipes/{id}.json",
      destroy : "/recipes/{id}.json"
},
...



Viewing all articles
Browse latest Browse all 3491

Trending Articles