Update poll when title is changed.

This commit is contained in:
Vikhyat Korrapati 2014-04-11 09:05:07 +05:30
parent 2928ce6ca1
commit edfea2f801
1 changed files with 4 additions and 0 deletions

View File

@ -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"];