From edfea2f801ddb8bc82840938d355bd5a175a2bb1 Mon Sep 17 00:00:00 2001 From: Vikhyat Korrapati Date: Fri, 11 Apr 2014 09:05:07 +0530 Subject: [PATCH] Update poll when title is changed. --- plugins/poll/assets/javascripts/poll_ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/poll/assets/javascripts/poll_ui.js b/plugins/poll/assets/javascripts/poll_ui.js index 2314edd1896..4e4bc8a560f 100644 --- a/plugins/poll/assets/javascripts/poll_ui.js +++ b/plugins/poll/assets/javascripts/poll_ui.js @@ -7,6 +7,10 @@ var Poll = Discourse.Model.extend({ this.updateFromJson(this.get('post.poll_details')); }.observes('post.poll_details'), + fetchNewPostDetails: function() { + this.get('post.topic.postStream').triggerChangedPost(this.get('post.id'), this.get('post.topic.updated_at')); + }.observes('post.topic.title'), + updateFromJson: function(json) { var selectedOption = json["selected"];