From 61f820cada16626da5e26b6cc44f4f985dd9cd5c Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 15 Aug 2014 06:25:19 +0200 Subject: [PATCH] Specify _finishedAt and _startedAt as dependencies for duration Because of our partial loading implementation we need to specify finishedAt and startedAt differently than we would normally do. For some reason duration was not recalculated while loading record and specifying raw attributes helps here. --- assets/scripts/app/models/extensions.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scripts/app/models/extensions.coffee b/assets/scripts/app/models/extensions.coffee index de5cff0a..ce334f01 100644 --- a/assets/scripts/app/models/extensions.coffee +++ b/assets/scripts/app/models/extensions.coffee @@ -6,7 +6,7 @@ Travis.DurationCalculations = Ember.Mixin.create duration else Travis.Helpers.durationFrom(@get('startedAt'), @get('finishedAt')) - ).property('_duration', 'finishedAt', 'startedAt', 'notStarted') + ).property('_duration', 'finishedAt', 'startedAt', 'notStarted', '_finishedAt', '_startedAt') updateTimes: -> unless @get('isFinished')