diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-06 17:32:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-06 17:32:06 +0100 |
commit | 6958eac1a00a4ab33e3facc70c80a07492288196 (patch) | |
tree | 06df21a64b2111690701b273e121620437afe155 /railties/lib/rails/generators | |
parent | 1d9d9d2d89a90a85f27a1909e3c435c070bc1b40 (diff) | |
download | rails-6958eac1a00a4ab33e3facc70c80a07492288196.tar.gz rails-6958eac1a00a4ab33e3facc70c80a07492288196.tar.bz2 rails-6958eac1a00a4ab33e3facc70c80a07492288196.zip |
Add config.generators.templates to provide alternative paths for template lookup.
Diffstat (limited to 'railties/lib/rails/generators')
-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 |