class Rails::Generators::Base
def self.inherited(base) #:nodoc:
source paths.
Cache source root and add lib/generators/base/generator/templates to
def self.inherited(base) #:nodoc: super # Invoke source_root so the default_source_root is set. base.source_root if base.name && base.name !~ /Base$/ Rails::Generators.subclasses << base Rails::Generators.templates_path.each do |path| 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 end