diaspora/app/presenters/profile_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

18 lines
356 B
Ruby

class ProfilePresenter < BasePresenter
def base_hash
{ id: id,
tags: tag_string,
bio: bio,
location: location,
gender: gender,
birthday: formatted_birthday,
searchable: searchable
}
end
def full_hash
base_hash.merge({
avatar: AvatarPresenter.new(@presentable).base_hash,
})
end
end