2012-10-29 22:45:11 +01:00
|
|
|
class UserDecorator < ApplicationDecorator
|
|
|
|
decorates :user
|
|
|
|
|
|
|
|
def avatar_image size = 16
|
|
|
|
h.image_tag h.gravatar_icon(self.email, size), class: "avatar #{"s#{size}"}", width: size
|
|
|
|
end
|
|
|
|
|
|
|
|
def tm_of(project)
|
|
|
|
project.team_member_by_id(self.id)
|
|
|
|
end
|
2013-01-19 18:51:01 +01:00
|
|
|
|
|
|
|
def name_with_email
|
|
|
|
"#{name} (#{email})"
|
|
|
|
end
|
2012-10-29 22:45:11 +01:00
|
|
|
end
|