Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update sequelize

  • Loading branch information...
commit bb5f20425e27ce979d5015098e5c13de5d461163 1 parent 7af257c
@dgf authored
Showing with 9 additions and 6 deletions.
  1. +5 −2 lib/crudl.js
  2. +2 −2 package.json
  3. +2 −2 src/crudl.coffee
View
7 lib/crudl.js
@@ -27,7 +27,10 @@
};
findAll = function(model, options, onSuccess, onError) {
- return model.all(options).error(onError).success(function(instances) {
+ console.log("MODEL", model);
+ return model.findAll(options).error(onError).success(function(instances) {
+ console.log("OPTIONS", options);
+ console.log("INSTANCES", instances);
return onSuccess(_.toArray(instances));
});
};
@@ -80,7 +83,7 @@
};
Crudl.prototype.all = function(onSuccess, onError) {
- return findAll(this.model, null, onSuccess, onError);
+ return findAll(this.model, {}, onSuccess, onError);
};
Crudl.prototype.list = function(options, onSuccess, onError) {
View
4 package.json
@@ -1,6 +1,6 @@
{
"name": "crudl-model"
- , "version": "0.1.2"
+ , "version": "0.1.3"
, "author": "Danny Gräf <github@dagnu.de>"
, "keywords": ["Sequelize", "ORM", "CRUD", "coffeescript"]
@@ -23,7 +23,7 @@
, "devDependencies": {
"ajsh": "0.1.x"
, "jasmine-node": "1.11.x"
- , "sequelize": "1.5.x"
+ , "sequelize": "1.7.x"
, "sqlite3": "2.1.x"
}
View
4 src/crudl.coffee
@@ -17,7 +17,7 @@ class Crudl
onError 'empty find query'
findAll = (model, options, onSuccess, onError)->
- model.all(options).error(onError).success (instances) ->
+ model.findAll(options).error(onError).success (instances) ->
onSuccess _.toArray(instances)
rawQuery = (model, query, onSuccess, onError) ->
@@ -55,7 +55,7 @@ class Crudl
# list all instances
all: (onSuccess, onError) ->
- findAll @model, null, onSuccess, onError
+ findAll @model, {}, onSuccess, onError
# list instances
list: (options, onSuccess, onError) ->
Please sign in to comment.
Something went wrong with that request. Please try again.