Skip to content

Commit

Permalink
Expose the loadAndRegisterControllers method for now.
Browse files Browse the repository at this point in the history
`loadAndRegisterControllers` used to be defined directly on the hook object, but was removed when it was moved to a different file.  A couple of apps in the wild are relying on it, so we'll re-introduce it for now, but it really needs to be wrapped in a public `.reload()` method.
  • Loading branch information
sgress454 committed Feb 11, 2016
1 parent 329d1d7 commit 0ba7829
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/hooks/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ module.exports = function(sails) {
sails.on('route:typeUnknown', interpretRouteSyntax);

// Load controllers from app and register their actions as middleware.
var loadAndRegisterControllers = toLoadAndRegisterControllers(sails, this);
loadAndRegisterControllers(cb);
// TODO -- make a public .reload() hook method, rather than exposing
// this private method on the hook object. Doing this for now because
// certain apps in the wild are relying on it.
this.loadAndRegisterControllers = toLoadAndRegisterControllers(sails, this);
this.loadAndRegisterControllers(cb);
},


Expand Down

0 comments on commit 0ba7829

Please sign in to comment.