module Transit module CoreExt module String def to_slug value = self.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n, '').to_s value.gsub!(/[']+/, '') value.gsub!(/\W+/, ' ') value.strip! value.downcase! value.gsub!(' ', '-') value end end end end String.send(:include, Transit::CoreExt::String)