diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-13 13:39:48 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-13 13:39:48 +0200 |
commit | cd28dcb5a4ebfaf94e441c1325d8aa072d394bb9 (patch) | |
tree | 1cf0a87c011585c6be720d7a8124a18345b4150d /railties/lib | |
parent | 3075ae0611625657de052a2ad93cf083d24bb803 (diff) | |
download | rails-cd28dcb5a4ebfaf94e441c1325d8aa072d394bb9.tar.gz rails-cd28dcb5a4ebfaf94e441c1325d8aa072d394bb9.tar.bz2 rails-cd28dcb5a4ebfaf94e441c1325d8aa072d394bb9.zip |
Cache source root in a rails specific variable.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generators/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/generators/base.rb b/railties/lib/generators/base.rb index 13916e081b..65bf74f12f 100644 --- a/railties/lib/generators/base.rb +++ b/railties/lib/generators/base.rb @@ -12,7 +12,7 @@ module Rails # Automatically sets the source root based on the class name. # def self.source_root - @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), base_name, generator_name, 'templates')) + @_rails_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), base_name, generator_name, 'templates')) end # Tries to get the description from a USAGE file one folder above the source |