Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Name Display in Page Title
def name_for_page_title user
result = "@" + user.screen_name
if I18n.locale == :en
result += user.screen_name.last == "s" ? "’" : "’s"
result += " (#{user.name.strip})" unless user.screen_name == user.name
end
return result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.