diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-28 00:17:14 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-27 15:19:16 -0800 |
commit | a176263ebc53682133ccb6d5c8ad5705c7058f86 (patch) | |
tree | 54ae9dee5078fa1d1ec3867ffdc6117e518955a2 /railties | |
parent | 292363c75fd096030091bdbe1e5afccc890cd0be (diff) | |
download | rails-a176263ebc53682133ccb6d5c8ad5705c7058f86.tar.gz rails-a176263ebc53682133ccb6d5c8ad5705c7058f86.tar.bz2 rails-a176263ebc53682133ccb6d5c8ad5705c7058f86.zip |
Fix generators tests.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |