class method
self.default_source_root
Ruby on Rails 3.1.12
Since v3.0.20Signature
self.default_source_root()
Returns the default source root for a given generator. This is used internally by rails to set its generators source root. If you want to customize your source root, you should use source_root.
Source
# File railties/lib/rails/generators/base.rb, line 208
def self.default_source_root
return unless base_name && generator_name
path = File.expand_path(File.join(base_name, generator_name, 'templates'), base_root)
path if File.exists?(path)
end
Defined in railties/lib/rails/generators/base.rb line 208
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Base