strongloop/loopback — pull request #158 by bajtos (2014-01-28 10:19:37+00:00)
Title: Improve the error message when ACL is not attached

Check whether the ACL model is attached to a datasource and report a helpful message if it is not.

One of the reasons why the ACL model may not be attached is that the user did not call `loopback.autoAttach()`.

This is the original error message:

```
TypeError: Object function ModelConstructor(data, dataSource) {
if (!(this instanceof ModelConstructor)) {
return new ModelConstructor(data, dataSource);
}
if (ModelClass.settings.unresolved) {
throw new Error('Model ' + ModelClass.modelName + ' is not defined.');
}
ModelBaseClass.apply(this, arguments);
if (dataSource) {
hiddenProperty(this, '__dataSource', dataSource);
}
} has no method 'find'
```

/to: @raymondfeng or @ritch please review