diaspora/app/presenters/profile_presenter.rb
Florian Staudacher 2572fb77fc * refactored text direction detector into helper (also for handlebars)
* added handlebars helper for markdown formatting
* finished port of profile sidebar view to handlebars template
* people_controller refactoring
2014-09-15 01:37:23 +02:00

24 lines
454 B
Ruby

class ProfilePresenter < BasePresenter
include PeopleHelper
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
def formatted_birthday
birthday_format(birthday) if birthday
end
end