Skip to content

Instantly share code, notes, and snippets.

@mxlje
Created August 3, 2015 11:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
slug = text.downcase.gsub(/(ä|Ä|ö|Ö|ü|Ü|ß| |\?|\!)/, {
'ä' => 'ae',
'Ä' => 'ae',
'ö' => 'oe',
'Ö' => 'oe',
'ü' => 'ue',
'Ü' => 'ue',
'ß' => 'ss',
' ' => '-',
'?' => '',
'!' => '',
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment