attr = DS.attr
App.User= DS.Model.extend
  name: attr('string')
  uid: attr('string')
  provider: attr('string')
  avatar: attr('string')
  lists: DS.hasMany('list') # in ember scope not many to many (yet)
  join_requests: DS.hasMany('join_request')
  avatar_tag: Ember.computed 'avatar', 'name', ->
    avatar = @get('avatar') || "#{$asset_path}/supplier/unknown-avatar.png"
    name = @get('name')
    "<img src='#{avatar}' alt='#{name}' title='#{name}' class='user-avatar-image #{@get('provider', '')}'>".htmlSafe()
