Created
June 11, 2009 16:34
-
-
Save petelacey/128036 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def best_name | |
return given_name unless self.given_name.blank? | |
return "#{first_name} #{last_name}".strip unless self.last_name.blank? | |
return user_name unless self.user_name.blank? | |
return uid | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment