From b46b533e70e8646a659211b189c2fb62bff2ec8a Mon Sep 17 00:00:00 2001
From: Robin Ward <robin.ward@gmail.com>
Date: Fri, 7 Jun 2013 18:04:51 -0400
Subject: [PATCH] Create the composer view with the defaultContainer. This is
 in prep for redeploying on RC5. Ideally we'll change how the composer is
 instantiated altogether but that will have to wait for a future release.

---
 .../discourse/controllers/composer_controller.js           | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/assets/javascripts/discourse/controllers/composer_controller.js b/app/assets/javascripts/discourse/controllers/composer_controller.js
index 5ec3d47a5..f36f72dea 100644
--- a/app/assets/javascripts/discourse/controllers/composer_controller.js
+++ b/app/assets/javascripts/discourse/controllers/composer_controller.js
@@ -217,9 +217,14 @@ Discourse.ComposerController = Discourse.Controller.extend({
     var view = this.get('view');
     var composerController = this;
     if (!view) {
-      view = Discourse.ComposerView.create({ controller: this });
+
+      // TODO: We should refactor how composer is inserted. It should probably use a
+      // {{render}} and then the controller and view will be wired up automatically.
+      appView = Discourse.__container__.lookup('view:application');
+      view = appView.createChildView(Discourse.ComposerView, {controller: this});
       view.appendTo($('#main'));
       this.set('view', view);
+
       // the next runloop is too soon, need to get the control rendered and then
       //  we need to change stuff, otherwise css animations don't kick in
       Em.run.next(function() {