From d2c1d050fc3bd714b297cc6b37a99c29649d5e57 Mon Sep 17 00:00:00 2001 From: Carlos Souza Date: Tue, 9 Dec 2014 15:29:28 -0500 Subject: Add guides for `required` model generator option. Related to this PR #16062 [ci skip] --- guides/source/active_record_migrations.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guides/source') 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. -- cgit v1.2.3