diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2019-06-14 13:25:16 +0200 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2019-06-14 14:07:28 +0200 |
commit | 5d4a77d324fa30c616d0e05144edc57f10cfb9b5 (patch) | |
tree | 088c66820cd4d8868e2d6fac05449663be75ff1d /railties/lib/rails/engine | |
parent | 2c3332cc4c0fa77dbe2e13e8a792f80fbd8f4ad3 (diff) | |
download | rails-5d4a77d324fa30c616d0e05144edc57f10cfb9b5.tar.gz rails-5d4a77d324fa30c616d0e05144edc57f10cfb9b5.tar.bz2 rails-5d4a77d324fa30c616d0e05144edc57f10cfb9b5.zip |
Fix TranslationHelper#translate handling of Hash defaults
It is sometimes expected of the `translate` methods to return a Hash,
for instance it's the case of the `number.format` key.
As such users might need to specify a Hash default, e.g.
`translate(:'some.format', default: { separator: '.', delimiter: ',' })`.
This works as expected with the `I18n.translate` methods,
however `TranslationHelper#translate` apply `Array()` on the default value.
As a result the default value end up as `[:separator, '.', :delimiter, ',']`.
Diffstat (limited to 'railties/lib/rails/engine')
0 files changed, 0 insertions, 0 deletions