 
   render: =>
     @$el.html @template()
-    @conversationListView = new ConversationListView()
+    @conversationListView = new ConversationListView
     @conversationListView.$el = @.$('.conversations')
     @conversationListView.render()
     this


  sendMessage: (event) =>
    event.preventDefault()
    data = _.object(_.map($(event.target).serializeArray(), _.values))
    message = new Message text: data.text
    message.url = "/bb/conversations/#{@id}/messages"
    message.save {},


  conversation: (id) ->
    chatView = new ChatView id: id
    window.chatView = chatView
    return

class App
  constructor: ->
    @router = new Router
    @navigationView = new NavigationView
    @navigationView.render()

(exports ? this).App = App
