Class: Modulorails::ModuloprojectGenerator

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

Instance Method Summary collapse

Methods inherited from Generators::Base

base_root, #call

Instance Method Details

#create_configObject



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

def create_config
  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