lib/application: publish Change models to REST API

When a public model is added to an application and the model has change
tracking enabled, its Change model is added to the public models.

Before this change, conflict resolution in the browser was not working,
because it was not possible to fetch the remote change.
This commit is contained in:
Miroslav Bajtoš 2014-07-15 09:31:16 +02:00
parent 087c602669
commit da9b724222
1 changed files with 2 additions and 0 deletions

View File

@ -154,6 +154,8 @@ app.model = function (Model, config) {
if (isPublic && Model.sharedClass) {
this.remotes().addClass(Model.sharedClass);
if (Model.settings.trackChanges && Model.Change)
this.remotes().addClass(Model.Change.sharedClass);
clearHandlerCache(this);
}