提交 67c2f539 编写于 作者: J José Valim

Allow templates for non namespaced generators too.

上级 edd07b5a
......@@ -158,7 +158,11 @@ def self.inherited(base) #:nodoc:
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册