From da9b7242222acc87268983aac0c813e81d710cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 15 Jul 2014 09:31:16 +0200 Subject: [PATCH] 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. --- lib/application.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/application.js b/lib/application.js index d588fafd..228d4d1a 100644 --- a/lib/application.js +++ b/lib/application.js @@ -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); }