   role:   DS.attr("string")
   password: DS.attr("string")
 
+
 App.CurrentUser = App.User.extend({})
-
 
 
 App.Room = DS.Model.extend
   name: DS.attr("string")
   roomUserState: DS.belongsTo("room_user_state")
   messages: DS.hasMany("message")
+  users: DS.hasMany("user")
 
 
 


    $.getJSON url, (response)=>
      Em.$.each response.messages, @onEachMessage.bind(@)

})


App.MessagePoller = Em.Object.extend
  start: ()->
    @started = true
    @messages = []
    @beforeMessageId = null
    @fetchMessages() && @timer = setInterval(@fetchMessages.bind(@), 3000)

  setRoom: (room)->
    @room = room
