diff options
author | Sharang Dashputre <sharang.d@gmail.com> | 2019-03-12 00:39:58 +0530 |
---|---|---|
committer | Sharang Dashputre <sharang.d@gmail.com> | 2019-03-12 01:48:21 +0530 |
commit | 818437c3664039f7038364910fc4ac80450f36a2 (patch) | |
tree | b0886b71a3320e222c1a0ae06e7b9aeefc1266fd /activesupport/lib | |
parent | 878e98091d93603e07620ca9177f58a880ab9cb8 (diff) | |
download | rails-818437c3664039f7038364910fc4ac80450f36a2.tar.gz rails-818437c3664039f7038364910fc4ac80450f36a2.tar.bz2 rails-818437c3664039f7038364910fc4ac80450f36a2.zip |
Fix bug with parametrize when `locale` is passed
Also add tests for parametrize and transliterate
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/inflector/transliterate.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index 09e6cbeaaf..fe778ff0e7 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -90,7 +90,7 @@ module ActiveSupport # def parameterize(string, separator: "-", preserve_case: false, locale: nil) # Replace accented chars with their ASCII equivalents. - parameterized_string = transliterate(string, locale) + parameterized_string = transliterate(string, locale: locale) # Turn unwanted chars into the separator. parameterized_string.gsub!(/[^a-z0-9\-_]+/i, separator) |