user_decorator.rb 262 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 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 end