You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
metu.life/app/helpers/profile_helper.rb

13 lines
362 B

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