* introduce new presenters and extend the functionality of the BasePresenter * add a handlebars template for the profile sidebar, render it everytime we need to update * introduce a 'aspect_membership:update' global event
12 lines
276 B
Ruby
12 lines
276 B
Ruby
|
|
class AvatarPresenter < BasePresenter
|
|
|
|
DEFAULT_IMAGE = ActionController::Base.helpers.image_path('user/default.png')
|
|
|
|
def base_hash
|
|
{ s: image_url_small || DEFAULT_IMAGE,
|
|
m: image_url_medium || DEFAULT_IMAGE,
|
|
l: image_url || DEFAULT_IMAGE
|
|
}
|
|
end
|
|
end
|