diff options
author | Roque Pinel <repinel@gmail.com> | 2015-06-22 22:28:57 -0400 |
---|---|---|
committer | Roque Pinel <repinel@gmail.com> | 2015-07-20 23:19:43 -0400 |
commit | b184398b5359da5b76367aa61551d0f3d7e99fc5 (patch) | |
tree | 1856972e8a55547961795097f6acda9b4144996f /activerecord/CHANGELOG.md | |
parent | 51d333ae5a353ee8fa827fc5c96780d66174e932 (diff) | |
download | rails-b184398b5359da5b76367aa61551d0f3d7e99fc5.tar.gz rails-b184398b5359da5b76367aa61551d0f3d7e99fc5.tar.bz2 rails-b184398b5359da5b76367aa61551d0f3d7e99fc5.zip |
Deprecate and rename the keys for association restrict_dependent_destroy
Previously `has_one` and `has_many` associations were using the
`one` and `many` keys respectively. Both of these keys have special
meaning in I18n (they are considered to be pluralizations) so by
renaming them to `has_one` and `has_many` we make the messages more
explicit and most importantly they don't clash with linguistical
systems that need to validate translation keys (and their
pluralizations).
The `:'restrict_dependent_destroy.one'` key should be replaced with
`:'restrict_dependent_destroy.has_one'`, and
`:'restrict_dependent_destroy.many'` with
`:'restrict_dependent_destroy.has_many'`.
[Roque Pinel & Christopher Dell]
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index d9aa703d19..22f805fea4 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,19 @@ +* Deprecate the keys for association `restrict_dependent_destroy` errors in favor + of new key names. + + Previously `has_one` and `has_many` associations were using the + `one` and `many` keys respectively. Both of these keys have special + meaning in I18n (they are considered to be pluralizations) so by + renaming them to `has_one` and `has_many` we make the messages more explicit + and most importantly they don't clash with linguistical systems that need to + validate translation keys (and their pluralizations). + + The `:'restrict_dependent_destroy.one'` key should be replaced with + `:'restrict_dependent_destroy.has_one'`, and `:'restrict_dependent_destroy.many'` + with `:'restrict_dependent_destroy.has_many'`. + + *Roque Pinel*, *Christopher Dell* + * Fix state being carried over from previous transaction. Considering the following example where `name` is a required attribute. |