Created
September 11, 2014 19:09
-
-
Save ckozus/d562f7faf7d5965a708e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 full_name | |
if self.first_name.nil? || self.last_name.nil? | |
self.username | |
else | |
self.first_name+" "+self.last_name | |
end | |
end | |
def full_name | |
if first_name && last_name | |
"#{first_name} #{last_name}" | |
else | |
username | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment