diff options
author | Malcolm Locke <malc@wholemeal.co.nz> | 2016-08-05 11:39:47 +1200 |
---|---|---|
committer | Malcolm Locke <malc@wholemeal.co.nz> | 2016-08-05 11:39:47 +1200 |
commit | 97b5341d6a63c5f730930f5fc021fb4eb15fcfc5 (patch) | |
tree | c4bb8376e5c977dd4799d490260c93ce9ff08d68 /guides/source | |
parent | 320d40123ab0befe248373aab8ac2e2a3dec33cd (diff) | |
download | rails-97b5341d6a63c5f730930f5fc021fb4eb15fcfc5.tar.gz rails-97b5341d6a63c5f730930f5fc021fb4eb15fcfc5.tar.bz2 rails-97b5341d6a63c5f730930f5fc021fb4eb15fcfc5.zip |
List names of error interpolation variables.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/i18n.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 850f0def03..e623f8cf8a 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -866,7 +866,7 @@ This way you can provide special translations for various error messages at diff #### Error Message Interpolation -The translated model name, translated attribute name, and value are always available for interpolation. +The translated model name, translated attribute name, and value are always available for interpolation as `model`, `attribute` and `value` respectively. So, for example, instead of the default error message `"cannot be blank"` you could use the attribute name like this : `"Please fill in your %{attribute}"`. |