diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-07-19 17:28:52 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-07-19 17:28:52 -0600 |
commit | 6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a (patch) | |
tree | 57c95b6b57d2cba6fe5fb97bd8fd40a9599eff23 /activesupport | |
parent | f91439d848b305a9d8f83c10905e5012180ffa28 (diff) | |
download | rails-6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a.tar.gz rails-6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a.tar.bz2 rails-6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a.zip |
Fix tests broken by previous commit
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 5e95d2e5a5..60ef249e37 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -92,7 +92,7 @@ module ActiveSupport return camel_cased_word unless camel_cased_word =~ /[A-Z-]|::/ word = camel_cased_word.to_s.gsub('::'.freeze, '/'.freeze) word.gsub!(/(?:(?<=([A-Za-z\d]))|\b)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1 && '_'.freeze }#{$2.downcase}" } - word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, ' \1_\2'.freeze) + word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2'.freeze) word.gsub!(/([a-z\d])([A-Z])/, '\1_\2'.freeze) word.tr!("-".freeze, "_".freeze) word.downcase! |