diff options
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index dfa0d573c9..c801e2fec3 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -213,8 +213,7 @@ module Rails if base.name && base.name !~ /Base$/ Rails::Generators.subclasses << base - if defined?(Rails.root) && Rails.root - path = File.expand_path(File.join(Rails.root, 'lib', 'templates')) + Rails::Generators.templates_path.each do |path| if base.name.include?('::') base.source_paths << File.join(path, base.base_name, base.generator_name) else |