Skip to content

Instantly share code, notes, and snippets.

@rmyers
Created October 20, 2015 17:41
Show Gist options
  • Save rmyers/3557ab252dac9be369b4 to your computer and use it in GitHub Desktop.
Save rmyers/3557ab252dac9be369b4 to your computer and use it in GitHub Desktop.
Ha Replica detach
ck.data.database.Instance.prototype.detach = function () {
var haGroup;
if (this.isHaGroupMember()) {
haGroup = new ck.data.database.HaGroup({id: this.get('ha_id')});
haGroup.setProvider(this.getProvider());
haGroup.detach(this.id());
} else {
this.getStore().detach(this.id());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment