diff options
author | Carlos Souza <carloshrsouza@gmail.com> | 2014-12-09 15:29:28 -0500 |
---|---|---|
committer | Carlos Souza <carloshrsouza@gmail.com> | 2014-12-09 15:35:15 -0500 |
commit | d2c1d050fc3bd714b297cc6b37a99c29649d5e57 (patch) | |
tree | 6444789d16e6faa27756316fa5dd46e6c4a05d88 /guides/source | |
parent | 44a6ed2fe5330d78db6eee0f3eb0ced8e7f4f421 (diff) | |
download | rails-d2c1d050fc3bd714b297cc6b37a99c29649d5e57.tar.gz rails-d2c1d050fc3bd714b297cc6b37a99c29649d5e57.tar.bz2 rails-d2c1d050fc3bd714b297cc6b37a99c29649d5e57.zip |
Add guides for `required` model generator option.
Related to this PR #16062
[ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_record_migrations.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index c8a31fe7b8..1a41fc8b4c 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -452,6 +452,8 @@ number of digits after the decimal point. are using a dynamic value (such as a date), the default will only be calculated the first time (i.e. on the date the migration is applied). * `index` Adds an index for the column. +* `required` Adds `required: true` for `belongs_to` associations and +`null: false` to the column in the migration. Some adapters may support additional options; see the adapter specific API docs for further information. |