Class: ActiveSeed::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveSeed::Generators::InstallGenerator
- Defined in:
- lib/generators/active_seed/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/generators/active_seed/install_generator.rb', line 6 def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#create_files ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/generators/active_seed/install_generator.rb', line 10 def create_files install_dir = File.join('db', 'active_seed') copy_file 'development.yml', File.join(install_dir, 'development.yml') copy_file 'development.yml', File.join(install_dir, 'production.yml') copy_file 'development.yml', File.join(install_dir, 'test.yml') empty_directory File.join(install_dir, 'data') end |