attr = DS.attr
App.User = DS.Model.extend
  name: attr('string')
  uid: attr('string')
  provider: attr('string')
  avatar: attr('string')
  list: DS.belongsTo('list') # in ember scope not many to many (yet)
  join_requests: DS.hasMany('join_request')
  avatar_tag: (->
    return unless avatar = @get('avatar')
    name = @get('name')
    "<img src='#{avatar}' alt='#{name}' title='#{name}' class='user-avatar-image #{@get('provider')}'>".htmlSafe()
  ).property('avatar', 'name')
