Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Deprecate the keys for association `restrict_dependent_destroy` errors in favor of new key names #20668
As suggested by #11658 (comment), it deprecates the
@rafaelfranca Is this what you expected?
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]