Class: Multitenant::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Multitenant::InstallGenerator
- Defined in:
- lib/generators/multitenant/install/install_generator.rb
Constant Summary collapse
- CONFIG_FILE_NAME =
'multitenant_mysql_conf.rb'
Instance Method Summary collapse
Instance Method Details
#copy_conf_file_into_app ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/generators/multitenant/install/install_generator.rb', line 9 def copy_conf_file_into_app dest = "config/initializers/#{CONFIG_FILE_NAME}" return if FileTest.exist?(dest) # to prevent overwritting of existing file src = File.(File.dirname(__FILE__)) + "/templates/#{CONFIG_FILE_NAME}" FileUtils.copy_file src, dest p "The file was created `#{dest}`" end |