diff options
author | Hugo Vacher <hugo.vacher@shopify.com> | 2019-03-11 13:42:38 -0400 |
---|---|---|
committer | Hugo Vacher <hugo.vacher@shopify.com> | 2019-03-11 15:55:16 -0400 |
commit | 9ccc5e104287e45b21e4129991b1e507aa1a7dff (patch) | |
tree | ed1debaf74e5ec3e639dfb218e0faccadc279ffb /activemodel | |
parent | 2176f4b30c9f4ea57a0fd4182808976b64202ab0 (diff) | |
download | rails-9ccc5e104287e45b21e4129991b1e507aa1a7dff.tar.gz rails-9ccc5e104287e45b21e4129991b1e507aa1a7dff.tar.bz2 rails-9ccc5e104287e45b21e4129991b1e507aa1a7dff.zip |
Update Changelog with new locale fallback behavior on validation
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/CHANGELOG.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index a644c63992..d7586f60ed 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,3 +1,27 @@ + +* Changed how validation error translation strings are fetched: The new behaviour + will first try the more specific keys, including doing locale fallback, then try + the less specific ones. + + For example this is the order keys will now be tried for a `blank` error on a + `product`'s `title` attribute with current locale set to `en-US`: + + en-US.activerecord.errors.models.product.attributes.title.blank + en-US.activerecord.errors.models.product.blank + en-US.activerecord.errors.messages.blank + + en.activerecord.errors.models.product.attributes.title.blank + en.activerecord.errors.models.product.blank + en.activerecord.errors.messages.blank + + en-US.errors.attributes.title.blank + en-US.errors.messages.blank + + en.errors.attributes.title.blank + en.errors.messages.blank + + *Hugo Vacher* + ## Rails 6.0.0.beta2 (February 25, 2019) ## * Fix date value when casting a multiparameter date hash to not convert |