Skip to content

Instantly share code, notes, and snippets.

@bamnet
Forked from zr2d2/gist:2555376
Created April 30, 2012 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bamnet/2555604 to your computer and use it in GitHub Desktop.
Save bamnet/2555604 to your computer and use it in GitHub Desktop.
# Get level name of a membership
def level_name
name = (Membership::LEVELS.respond_to?(:key) ? Membership::LEVELS.key(level) : Membership::LEVELS.index(level))
name.to_s.humanize
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment