We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bd360ad + 88cff33 commit dbe6a8bCopy full SHA for dbe6a8b
activesupport/lib/active_support/inflector/methods.rb
@@ -117,7 +117,8 @@ def humanize(lower_case_and_underscored_word, options = {})
117
result.gsub!(/([a-z\d]*)/i) { |match|
118
"#{inflections.acronyms[match] || match.downcase}"
119
}
120
- options.fetch(:capitalize, true) ? result.gsub(/^\w/) { $&.upcase } : result
+ result.gsub!(/^\w/) { $&.upcase } if options.fetch(:capitalize, true)
121
+ result
122
end
123
124
# Capitalizes all the words and replaces some characters in the string to
0 commit comments