diff options
author | Xavier Noria <fxn@hashref.com> | 2012-06-29 21:29:14 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-06-29 21:31:09 +0200 |
commit | 9e0b3fc7cfba43af55377488f991348e2de24515 (patch) | |
tree | fa173829cdd65b07ed5faf0d589b68f7afd05d1d /activesupport/lib/active_support | |
parent | 48601c27b7942a18482bc817321a1ce9effece20 (diff) | |
download | rails-9e0b3fc7cfba43af55377488f991348e2de24515.tar.gz rails-9e0b3fc7cfba43af55377488f991348e2de24515.tar.bz2 rails-9e0b3fc7cfba43af55377488f991348e2de24515.zip |
make sure the inflection rules are loaded when cherry-picking active_support/core_ext/string/inflections.rb [fixes #6884]
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/inflections.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/inflector/inflections.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb index 527cce2594..23a8e68c21 100644 --- a/activesupport/lib/active_support/inflections.rb +++ b/activesupport/lib/active_support/inflections.rb @@ -1,3 +1,5 @@ +require 'active_support/inflector/inflections' + module ActiveSupport Inflector.inflections do |inflect| inflect.plural(/$/, 's') diff --git a/activesupport/lib/active_support/inflector/inflections.rb b/activesupport/lib/active_support/inflector/inflections.rb index 90bb62f57b..1e27eacbeb 100644 --- a/activesupport/lib/active_support/inflector/inflections.rb +++ b/activesupport/lib/active_support/inflector/inflections.rb @@ -1,5 +1,7 @@ module ActiveSupport module Inflector + extend self + # A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional # inflection rules. Examples: # diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index f47dfba4b0..5a7c5e1e38 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -1,4 +1,5 @@ require 'active_support/inflector/inflections' +require 'active_support/inflections' module ActiveSupport # The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, |