Skip to content

Instantly share code, notes, and snippets.

@chrisportela
Created November 2, 2012 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisportela/3998302 to your computer and use it in GitHub Desktop.
Save chrisportela/3998302 to your computer and use it in GitHub Desktop.
controller for main function
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment