Skip to content

Instantly share code, notes, and snippets.

@ckozus
Created September 11, 2014 19:09
Show Gist options
  • Save ckozus/d562f7faf7d5965a708e to your computer and use it in GitHub Desktop.
Save ckozus/d562f7faf7d5965a708e to your computer and use it in GitHub Desktop.
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