diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-09 18:55:40 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-09 18:55:40 -0200 |
commit | 7c11ce6fe1d1f76294d45e93685dc9c7938eb975 (patch) | |
tree | 6444789d16e6faa27756316fa5dd46e6c4a05d88 /guides | |
parent | 44a6ed2fe5330d78db6eee0f3eb0ced8e7f4f421 (diff) | |
parent | d2c1d050fc3bd714b297cc6b37a99c29649d5e57 (diff) | |
download | rails-7c11ce6fe1d1f76294d45e93685dc9c7938eb975.tar.gz rails-7c11ce6fe1d1f76294d45e93685dc9c7938eb975.tar.bz2 rails-7c11ce6fe1d1f76294d45e93685dc9c7938eb975.zip |
Merge pull request #17988 from caike/master
Add guides for `required` model generator option
Diffstat (limited to 'guides')
-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. |