rails/rails — pull request #16062 by sgrif (2014-07-05 14:03:11+00:00)
Title: Add a `required` option to the model generator

Syntax was chosen to follow the passing of multiple options to
decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or
`-` to be used as a separator to avoid the need for shell quoting. (I'm
intending to expand this to all columns, but that's another PR.

The `required` option will cause 3 things to change. `required: true`
will be added to the association. `null: false` will be added to the
column in the migration. `add_foreign_key :table, :foreign_table` will
be added if the association is not polymorphic.