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:29:14 +0200 |
commit | 58c83d4c6108a67ee0cf2de4ed8ea91953f98d2d (patch) | |
tree | d971d93fb372fc6b16ebe2a6e71b9b23f16d86ba /activesupport | |
parent | 33192cfa07d82e345910cdb279f15305ad463faa (diff) | |
download | rails-58c83d4c6108a67ee0cf2de4ed8ea91953f98d2d.tar.gz rails-58c83d4c6108a67ee0cf2de4ed8ea91953f98d2d.tar.bz2 rails-58c83d4c6108a67ee0cf2de4ed8ea91953f98d2d.zip |
make sure the inflection rules are loaded when cherry-picking active_support/core_ext/string/inflections.rb [fixes #6884]
Diffstat (limited to 'activesupport')
-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 c04c2ed15b..ca2d8cb270 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 600e353812..c9e50a9462 100644 --- a/activesupport/lib/active_support/inflector/inflections.rb +++ b/activesupport/lib/active_support/inflector/inflections.rb @@ -2,6 +2,8 @@ require 'active_support/core_ext/array/prepend_and_append' 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. # diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 2acc6ddee5..c14a43de0d 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -1,6 +1,7 @@ # encoding: utf-8 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, |