Ruby on Rails Configuration Configuring generators


Example

Rails allows you to configure what generators are used when running rails generate commands. This method, config.generators takes a block

config.generators do |g|
  g.orm :active_record
  g.test_framework :test_unit
end

Here are some of the options

OptionDescriptionDefault
assetsCreates assets when generating scaffoldtrue
force_pluralAllows pluralized model namesfalse
helperDetermines whether to generate helperstrue
integration_toolSpecify integration tooltest_unit
javascript_engineConfigures JS engine:js
resource_routeGenerates resource routetrue
stylesheet_engineConfigures stylesheet engine:cs
scaffold_stylesheetCreates CSS upon scaffoldingtrue
test_frameworkSpecify Test FrameworkMinitest
template_engineConfigures template engine:erb