app/assets/javascripts/backbone/views/contacts/me.js.coffee
d4872cda
 Xmpp.Views.Contacts ||= {}
 
4b5bb9c5
 class Xmpp.Views.Contacts.MeView extends Backbone.View
d4872cda
   template: JST["backbone/templates/contacts/me"]
   el: $('#js-me')
 
   initialize: () ->
     _.bindAll(this)
 
     @model.on('change', @updateContact, this)
 
   updateContact: (me) ->
     @model = me
     @render()
 
   render: ->
     contact = @model.toJSON()
     $(@el).html(@template(contact))
     this