From 2c70f0ecaa507427d2592434cb4a516bcedd5039 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 28 Feb 2016 00:02:59 +0100 Subject: Adding paperclip for avatars, fixing design of the public pages --- app/helpers/profile_helper.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/helpers/profile_helper.rb') diff --git a/app/helpers/profile_helper.rb b/app/helpers/profile_helper.rb index 5a0d6b31f..2abe67635 100644 --- a/app/helpers/profile_helper.rb +++ b/app/helpers/profile_helper.rb @@ -1,2 +1,13 @@ module ProfileHelper + def display_name(account) + account.display_name.blank? ? account.username : account.display_name + end + + def profile_url(account) + account.local? ? super(name: account.username) : account.url + end + + def status_url(status) + status.local? ? super(name: status.account.username, id: status.stream_entry.id) : status.url + end end -- cgit