diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2009-12-27 15:23:38 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-12-27 15:23:38 -0800 |
commit | ebe3c8f2e473b086277e1c6a0cf1075a4068c6e0 (patch) | |
tree | 1886778075207a507357a69dd46dec77c5524f85 | |
parent | 438a8c3ec798e5c1b983db8a8421f634021d4420 (diff) | |
parent | a176263ebc53682133ccb6d5c8ad5705c7058f86 (diff) | |
download | rails-ebe3c8f2e473b086277e1c6a0cf1075a4068c6e0.tar.gz rails-ebe3c8f2e473b086277e1c6a0cf1075a4068c6e0.tar.bz2 rails-ebe3c8f2e473b086277e1c6a0cf1075a4068c6e0.zip |
Merge branch 'master' of github.com:rails/rails
-rw-r--r-- | activemodel/lib/active_model.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators.rb | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index e0de27b96d..0e43a1b30a 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -55,4 +55,5 @@ module ActiveModel end end +require 'active_support/i18n' I18n.load_path << File.dirname(__FILE__) + '/active_model/locale/en.yml' diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 16b28dd295..2ba56bc3c5 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -5,6 +5,7 @@ require 'active_support' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/object/metaclass' require 'active_support/core_ext/array/extract_options' +require 'active_support/core_ext/hash/deep_merge' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/string/inflections' @@ -94,7 +95,7 @@ module Rails end def self.plugins_generators_paths #:nodoc: - return [] unless defined?(Rails.root) + return [] unless defined?(Rails.root) && Rails.root Dir[File.join(Rails.root, "vendor", "plugins", "*", "lib", "{generators,rails_generators}")] end @@ -135,7 +136,7 @@ module Rails def self.load_paths @load_paths ||= begin paths = [] - paths += Dir[File.join(Rails.root, "lib", "{generators,rails_generators}")] if defined?(Rails.root) + paths += Dir[File.join(Rails.root, "lib", "{generators,rails_generators}")] if defined?(Rails.root) && Rails.root paths += Dir[File.join(Thor::Util.user_home, ".rails", "{generators,rails_generators}")] paths += self.plugins_generators_paths paths += self.gems_generators_paths |