LocationsモデルとRecordersモデルがあります。両方のデータセットのすべてのデータをビューモデルに渡せるようにしたい。'all'と呼んでいるために未定義のエラーが発生しているため、スコープ内にないと思うので、どうすればそれらにアクセスできますか
https://gist.github.com/3998302
var Main = function () {
  this.index = function (req, resp, params) {
    var self = this;
    var data = {};
    geddy.model.Locations.all(function(err, locations) {
        data.locations = locations;
        geddy.model.Recorders.all(function(err, recorders) {
            data.recorders = recorders;
            self.respond({params: params, data: data}, {
            format: 'html'
            , template: 'app/views/locations/index'
            }
        });
    }););
  };
};
exports.Main = Main;
エラースニペット:
timers.js:103
            if (!process.listeners('uncaughtException').length) throw e;
                                                                      ^
TypeError: Cannot call method 'all' of undefined
    at index (G:\code\PeopleTracker\app\controllers\main.js:23:24)
    at controller.BaseController._handleAction.callback (C:\Users\Chris\AppData\Roaming\npm\node_modules\geddy\lib\base_
controller.js:387:22)