place this in your application.rb (eg)
class String
def translit
Unicode.normalize_KD(self).unpack('U*').select{ |cp| cp < 127 }.pack('U*').gsub(/ /,'-').downcase
end
end
place this in your application.rb (eg)
class String
def translit
Unicode.normalize_KD(self).unpack('U*').select{ |cp| cp < 127 }.pack('U*').gsub(/ /,'-').downcase
end
end