Avoid warnings by undefining the old method transliterate.
This commit is contained in:
parent
e0993c6c37
commit
3e9fc279e5
|
@ -279,6 +279,7 @@ module ActiveSupport
|
|||
# The iconv transliteration code doesn't function correctly
|
||||
# on some platforms, but it's very fast where it does function.
|
||||
if "foo" != Inflector.transliterate("föö")
|
||||
undef_method :transliterate
|
||||
def transliterate(string)
|
||||
string.mb_chars.normalize(:kd). # Decompose accented characters
|
||||
gsub(/[^\x00-\x7F]+/, '') # Remove anything non-ASCII entirely (e.g. diacritics).
|
||||
|
|
Loading…
Reference in New Issue