diaspora/app/presenters/avatar_presenter.rb
Florian Staudacher fba3092c61 * cleanup people_controller#show, add people_controller#stream for json
* 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
2014-09-15 01:37:23 +02:00

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