1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #41765 from JasonBarnabe/patch-2

Specifiy association :validate option only applies to new associated objects

[ci skip]
This commit is contained in:
Ryuta Kamizono 2021-03-28 10:35:24 +09:00 committed by GitHub
commit 4fe1220e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1092,7 +1092,7 @@ end
##### `:validate`
If you set the `:validate` option to `true`, then associated objects will be validated whenever you save this object. By default, this is `false`: associated objects will not be validated when this object is saved.
If you set the `:validate` option to `true`, then new associated objects will be validated whenever you save this object. By default, this is `false`: new associated objects will not be validated when this object is saved.
##### `:optional`
@ -1412,7 +1412,7 @@ end
##### `:validate`
If you set the `:validate` option to `true`, then associated objects will be validated whenever you save this object. By default, this is `false`: associated objects will not be validated when this object is saved.
If you set the `:validate` option to `true`, then new associated objects will be validated whenever you save this object. By default, this is `false`: new associated objects will not be validated when this object is saved.
#### Scopes for `has_one`
@ -1851,7 +1851,7 @@ The `:through` option specifies a join model through which to perform the query.
##### `:validate`
If you set the `:validate` option to `false`, then associated objects will not be validated whenever you save this object. By default, this is `true`: associated objects will be validated when this object is saved.
If you set the `:validate` option to `false`, then new associated objects will not be validated whenever you save this object. By default, this is `true`: new associated objects will be validated when this object is saved.
#### Scopes for `has_many`