From 381210daa0b8db26be85841b8ccf889d0ef67d75 Mon Sep 17 00:00:00 2001 From: Amos King Date: Fri, 22 Aug 2008 13:31:13 +0100 Subject: camelize(:lower) should always downcase first character. [#696 state:resolved] Signed-off-by: Pratik Naik --- activesupport/lib/active_support/inflector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index c2738b39fc..1e189465bd 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -173,7 +173,7 @@ module ActiveSupport if first_letter_in_uppercase lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } else - lower_case_and_underscored_word.first + camelize(lower_case_and_underscored_word)[1..-1] + lower_case_and_underscored_word.first.downcase + camelize(lower_case_and_underscored_word)[1..-1] end end -- cgit v1.2.3