Class: Modulorails::ModuloprojectGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/modulorails/moduloproject/moduloproject_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_config_fileObject



10
11
12
13
14
15
16
17
# File 'lib/generators/modulorails/moduloproject/moduloproject_generator.rb', line 10

def create_config_file
  template 'config/environments/production.rb'
  copy_file('config/environments/production.rb', 'config/environments/staging.rb')
  update_application_rb
  create_file('config/locales/fr.yml', "--\nfr: {}\n")
rescue StandardError => e
  warn("[Modulorails] Error: cannot generate Moduloproject configuration: #{e.message}")
end