Where are the docs for Rails "script/generate model"?

This document on Rails Migration would help.

With respect to the naming convention, I think the general adopted convention for Ruby on Rails is to have underscores.

To know which variable types are acceptable, refer to the section on Database Mapping.


To check Rails naming conventions, topfunky's Pluralizer was useful.


Type the command without arguments and the documentation is revealed:

$ script/generate model

You can use either camelcase or underscores for the model name.

  • Model names are singular; controller names are plural.
  • Field names use underscores.

I can't remember all the possible field types, I just look them up from the Migration docs, as linked above.


There is a resource on the rails wiki as a List of Available Generators.