Skip to content

Instantly share code, notes, and snippets.

@mdeiters
Created April 27, 2010 10:26
Show Gist options
  • Select an option

  • Save mdeiters/380596 to your computer and use it in GitHub Desktop.

Select an option

Save mdeiters/380596 to your computer and use it in GitHub Desktop.
module GamesHelper
def friendly_team_name(team)
if team.nil?
''
else
team.name
end
end
def friendly_team_name(team)
return '' if team.nil?
team.name
end
def friendly_team_name(team)
team.name unless team.nil?
end
def friendly_team_name(team)
return team.name if team
end
def friendly_team_name(team)
team.nil? ? '' : team.name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment