From 3e2c4e025a9b808e6dd7779aab52799b1be23131 Mon Sep 17 00:00:00 2001 From: Ryan Worth Date: Fri, 20 Mar 2015 18:23:02 +1000 Subject: [PATCH 1/2] Fixes #579 & #713 --- src/restangular.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/restangular.js b/src/restangular.js index 73fc73ae..0e0167c5 100644 --- a/src/restangular.js +++ b/src/restangular.js @@ -895,6 +895,7 @@ restangular.provider('Restangular', function() { function resolvePromise(deferred, response, data, filledValue) { _.extend(filledValue, data); + filledValue = restangularizeElem(data[config.restangularFields.parentResource], filledValue, data[config.restangularFields.route], true); // Trigger the full response interceptor. if (config.fullResponse) { From a332b8a22a310fbff36090ddffb597d1f9d4d29d Mon Sep 17 00:00:00 2001 From: Ryan Worth Date: Mon, 13 Apr 2015 10:19:01 +1000 Subject: [PATCH 2/2] Amended fix so that it passes tests --- src/restangular.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/restangular.js b/src/restangular.js index 0e0167c5..56190e17 100644 --- a/src/restangular.js +++ b/src/restangular.js @@ -895,7 +895,7 @@ restangular.provider('Restangular', function() { function resolvePromise(deferred, response, data, filledValue) { _.extend(filledValue, data); - filledValue = restangularizeElem(data[config.restangularFields.parentResource], filledValue, data[config.restangularFields.route], true); + filledValue = restangularizeElem(filledValue[config.restangularFields.parentResource], filledValue, filledValue[config.restangularFields.route], true); // Trigger the full response interceptor. if (config.fullResponse) {