mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Cache source root in a rails specific variable.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user