Fix index result caching

This commit is contained in:
Toby Zerner 2015-02-26 09:45:12 +10:30
parent 05a4662a02
commit 7dd49cb445
3 changed files with 3 additions and 4 deletions

View File

@ -24,7 +24,7 @@ export default Ember.Controller.extend(UseComposer, Paneable, {
var controller = this;
return this.saveAndDismissComposer(discussion).then(function(discussion) {
controller.get('index').send('refresh');
controller.get('index').send('loadResults');
controller.transitionToRoute('discussion', discussion);
});
},

View File

@ -113,9 +113,8 @@ export default Ember.Controller.extend({
model.removeObject(model.findBy('content', discussion));
},
refresh: function() {
loadResults: function() {
var controller = this;
controller.set('model', Ember.ArrayProxy.create());
controller.set('resultsLoading', true);
controller.getResults().then(function(results) {
controller

View File

@ -16,7 +16,7 @@ export default Ember.Route.extend(AddCssClassToBody, {
controller.set('model', model);
if (!model.get('length')) {
controller.send('refresh');
controller.send('loadResults');
}
},