Skip to content

Instantly share code, notes, and snippets.

@coderdan
Last active November 25, 2019 00:36
Show Gist options
  • Save coderdan/b98c0915fd61101bcc3a1b18df142324 to your computer and use it in GitHub Desktop.
Save coderdan/b98c0915fd61101bcc3a1b18df142324 to your computer and use it in GitHub Desktop.
def print_name(user)
if user.present? and user.kind_of?(User)
"#{user.firstname} #{user.lastname}"
else
"Unknown"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment