I have a page where i show all the quizzes as a feed. When ever i create a new quiz, i transitionRoute to show all the quizzes again. But the first record is always getting appended to the new quiz created and the it is repeated throughout.
QuizAPP.ShowRoute = Ember.Route.extend({
model: function(){
console.log("Route of quiz show")
return this.get('store').find('quiz');
},
setupController: function(controller,model){
controller.set('quizzes',model);
},
renderTemplate: function(){
this.render('quiz/show');
}
});
QuizAPP.NewRoute = Ember.Route.extend({
renderTemplate: function(){
this.render('quiz/new');
}
});