aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/inflections.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/inflections.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/inflections.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb
index eef8a5bc89..07291032a6 100644
--- a/activesupport/lib/active_support/core_ext/string/inflections.rb
+++ b/activesupport/lib/active_support/core_ext/string/inflections.rb
@@ -12,8 +12,11 @@ module ActiveSupport #:nodoc:
Inflector.singularize(self)
end
- def camelize
- Inflector.camelize(self)
+ def camelize(first_letter = :upper)
+ case first_letter
+ when :upper then Inflector.camelize(self, true)
+ when :lower then Inflector.camelize(self, false)
+ end
end
alias_method :camelcase, :camelize