From cd28dcb5a4ebfaf94e441c1325d8aa072d394bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 13 Jul 2009 13:39:48 +0200 Subject: Cache source root in a rails specific variable. --- railties/lib/generators/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3