diff options
-rw-r--r-- | activesupport/lib/active_support.rb | 3 | ||||
-rw-r--r-- | activesupport/lib/active_support/all.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/conversions.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/i18n.rb | 2 | ||||
-rwxr-xr-x | railties/bin/rails | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators.rb | 7 |
6 files changed, 8 insertions, 8 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index f2baa5a56a..8215cfaf0d 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -70,6 +70,3 @@ module ActiveSupport end require 'active_support/vendor' - -require 'i18n' -I18n.load_path << "#{File.dirname(__FILE__)}/active_support/locale/en.yml" diff --git a/activesupport/lib/active_support/all.rb b/activesupport/lib/active_support/all.rb index f537818300..64600575d9 100644 --- a/activesupport/lib/active_support/all.rb +++ b/activesupport/lib/active_support/all.rb @@ -1,3 +1,4 @@ require 'active_support' +require 'active_support/i18n' require 'active_support/time' require 'active_support/core_ext' diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index db140225e8..7fcef38372 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -1,6 +1,7 @@ require 'active_support/core_ext/hash/keys' require 'active_support/core_ext/hash/reverse_merge' require 'active_support/inflector' +require 'active_support/i18n' class Array # Converts the array to a comma-separated sentence where the last element is joined by the connector word. Options: diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb new file mode 100644 index 0000000000..854c60eec1 --- /dev/null +++ b/activesupport/lib/active_support/i18n.rb @@ -0,0 +1,2 @@ +require 'i18n' +I18n.load_path << "#{File.dirname(__FILE__)}/locale/en.yml"
\ No newline at end of file diff --git a/railties/bin/rails b/railties/bin/rails index 0f51d5739f..b8b2d6188f 100755 --- a/railties/bin/rails +++ b/railties/bin/rails @@ -20,7 +20,7 @@ end ARGV << "--help" if ARGV.empty? -require 'rails' + require 'rails/generators' require 'rails/generators/rails/app/app_generator' diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 0e66c9f58f..16b28dd295 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -4,8 +4,7 @@ $:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.inc require 'active_support' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/object/metaclass' -require 'active_support/core_ext/array' -require 'active_support/core_ext/hash' +require 'active_support/core_ext/array/extract_options' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/string/inflections' @@ -95,7 +94,7 @@ module Rails end def self.plugins_generators_paths #:nodoc: - return [] unless Rails.root + return [] unless defined?(Rails.root) Dir[File.join(Rails.root, "vendor", "plugins", "*", "lib", "{generators,rails_generators}")] end @@ -136,7 +135,7 @@ module Rails def self.load_paths @load_paths ||= begin paths = [] - paths += Dir[File.join(Rails.root, "lib", "{generators,rails_generators}")] if Rails.root + paths += Dir[File.join(Rails.root, "lib", "{generators,rails_generators}")] if defined?(Rails.root) paths += Dir[File.join(Thor::Util.user_home, ".rails", "{generators,rails_generators}")] paths += self.plugins_generators_paths paths += self.gems_generators_paths |