Skip to content

Conversation

@cwagner22
Copy link

My models are in subdirectories like this:

api/user
  user.controller.js
  user.model.js
api/song
  song.controller.js
  song.model.js

I load the models using a custom function and then create penguin.Admin with this:

  var admin = new penguin.Admin({
    modelsPath: null,
  });

Maybe a better way to do it would be to add a boolean.

@aularon
Copy link
Contributor

aularon commented Nov 24, 2014

The code you provided will break automatic loading of models from a folder, as it will skip the asynchronous code branch, without waiting for it to complete.

I will change it, probably using async, so it will work in both cases.

Thank you :-)

@aularon aularon self-assigned this Nov 24, 2014
@cwagner22
Copy link
Author

Yes you are right, first time I work with CoffeeScript, sorry about that ;)
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants