Skip to content

Commit

Permalink
add special requires for ActiveSupport::Inflector so you can load it …
Browse files Browse the repository at this point in the history
…individually
  • Loading branch information
technoweenie committed Jun 28, 2008
1 parent 7fc628e commit aec3c7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activesupport/lib/active_support/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,9 @@ def ordinalize(number)
end
end

# in case active_support/inflector is required without the rest of active_support
require 'active_support/inflections'
require 'active_support/core_ext/string/inflections'
unless String.included_modules.include?(ActiveSupport::CoreExtensions::String::Inflections)
String.send :include, ActiveSupport::CoreExtensions::String::Inflections
end

0 comments on commit aec3c7a

Please sign in to comment.