From 90e3242a3c1cc7910e93eb3f3389d88729dfe296 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 6 Oct 2014 12:27:12 -0400 Subject: [PATCH] FIX: `topic-admin-menu` controller was not a proper singleton. --- app/assets/javascripts/discourse/routes/topic_route.js | 2 ++ app/assets/javascripts/discourse/templates/topic.hbs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/routes/topic_route.js b/app/assets/javascripts/discourse/routes/topic_route.js index 7e4b5ecd877..2c5d08b9bc4 100644 --- a/app/assets/javascripts/discourse/routes/topic_route.js +++ b/app/assets/javascripts/discourse/routes/topic_route.js @@ -196,6 +196,8 @@ Discourse.TopicRoute = Discourse.Route.extend({ showExtraInfo: false }); + this.controllerFor('topic-admin-menu').set('model', model); + this.controllerFor('composer').set('topic', model); Discourse.TopicTrackingState.current().trackIncoming('all'); controller.subscribe(); diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index 634ed2829f6..7ca9ceaac2e 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -158,5 +158,5 @@ {{/if}} {{#if currentUser.canManageTopic}} - {{render "topic-admin-menu" content}} + {{render "topic-admin-menu"}} {{/if}}