diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 00:02:59 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 00:02:59 +0100 |
commit | 2c70f0ecaa507427d2592434cb4a516bcedd5039 (patch) | |
tree | 7d5382144ae1c6d8f87af3b09c06654db5740684 /app/helpers | |
parent | fa29ef3a41816ee915c52707bcd9db6cc9cdf7d6 (diff) |
Adding paperclip for avatars, fixing design of the public pages
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/profile_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |