Skip to content

Instantly share code, notes, and snippets.

@jpogran
Created March 22, 2011 13:50
Show Gist options
  • Save jpogran/881230 to your computer and use it in GitHub Desktop.
Save jpogran/881230 to your computer and use it in GitHub Desktop.
friendly name for user in view
def full_name
"#{first_name} #{last_name}".trim
end
def friendly_name
return full_name unless full_name.blank?
email
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment