Created
August 14, 2012 16:14
-
-
Save Gregg/3350565 to your computer and use it in GitHub Desktop.
missing challenge?
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
# before | |
def first_or_last_name | |
if user.first_name | |
user.first_name | |
else | |
user.last_name | |
end | |
end | |
# after | |
def first_or_last_name | |
user.first_name || user.last_name | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment