Permalink
Browse files

clearer examples

  • Loading branch information...
Techwraith
Techwraith committed Mar 13, 2012
1 parent c3b5119 commit 3baaf5027fb4f6b57a13a7e9ca788776b7e4f3e2
Showing with 2 additions and 4 deletions.
  1. +1 −2 examples/todo_app/config/init.js
  2. +1 −2 examples/todo_app/lib/model_adapters/todo.js
@@ -1,12 +1,11 @@
-geddy.todos = [];
-
// Add uncaught-exception handler in prod-like environments
if (geddy.config.environment != 'development') {
process.addListener('uncaughtException', function (err) {
geddy.log.error(JSON.stringify(err));
});
}
+geddy.todos = [];
geddy.model.adapter = {};
geddy.model.adapter.Todo = require(process.cwd() + '/lib/model_adapters/todo').Todo;
@@ -8,8 +8,7 @@ var Todo = new (function () {
for (var i in geddy.todos) {
if (geddy.todos[i].id == id) {
- callback(null, geddy.todos[i]);
- return;
+ return callback(null, geddy.todos[i]);
}
}
callback({message: "To Do not found"}, null);

0 comments on commit 3baaf50

Please sign in to comment.