diff options
author | Florian Staudacher <florian_staudacher@yahoo.de> | 2014-09-06 02:55:57 +0400 |
---|---|---|
committer | Florian Staudacher <florian_staudacher@yahoo.de> | 2014-09-15 03:37:23 +0400 |
commit | fba3092c614dc17f64a3f469372ea183614e965a (patch) | |
tree | 6a9521987eef5fa93344f6491d05e0e94e7915fa /app/presenters/avatar_presenter.rb | |
parent | d00d69814eae2273d0aa6c9a43e7eef615b207cf (diff) |
* 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
Diffstat (limited to 'app/presenters/avatar_presenter.rb')
-rw-r--r-- | app/presenters/avatar_presenter.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/presenters/avatar_presenter.rb b/app/presenters/avatar_presenter.rb new file mode 100644 index 000000000..10cabb949 --- /dev/null +++ b/app/presenters/avatar_presenter.rb @@ -0,0 +1,12 @@ + +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 |