diff options
Diffstat (limited to 'railties/lib/generators')
-rw-r--r-- | railties/lib/generators/base.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/generators/base.rb b/railties/lib/generators/base.rb index 4c38e0f5be..a6a2998af5 100644 --- a/railties/lib/generators/base.rb +++ b/railties/lib/generators/base.rb @@ -158,7 +158,11 @@ module Rails if defined?(RAILS_ROOT) && base.name !~ /Base$/ path = File.expand_path(File.join(RAILS_ROOT, 'lib', 'templates')) - base.source_paths << File.join(path, base.base_name, base.generator_name) + if base.name.include?('::') + base.source_paths << File.join(path, base.base_name, base.generator_name) + else + base.source_paths << File.join(path, base.generator_name) + end end end |