aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-01 12:14:34 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-01 12:14:34 -0700
commit882dd4e6054470ee56c46ab1432861952c81b633 (patch)
treed107ff755f94478a79b3dd666216b006219d9704 /activesupport/lib/active_support/inflector.rb
parent7583a24ee0ea85d55a5e235c3082f1b67d3d7694 (diff)
downloadrails-882dd4e6054470ee56c46ab1432861952c81b633.tar.gz
rails-882dd4e6054470ee56c46ab1432861952c81b633.tar.bz2
rails-882dd4e6054470ee56c46ab1432861952c81b633.zip
ensure Inflector.camelize works with symbols [#2856 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
Diffstat (limited to 'activesupport/lib/active_support/inflector.rb')
-rw-r--r--activesupport/lib/active_support/inflector.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb
index ff70d6d76e..92c1de057b 100644
--- a/activesupport/lib/active_support/inflector.rb
+++ b/activesupport/lib/active_support/inflector.rb
@@ -183,7 +183,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.downcase + camelize(lower_case_and_underscored_word)[1..-1]
+ lower_case_and_underscored_word.to_s.first.downcase + camelize(lower_case_and_underscored_word)[1..-1]
end
end