mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #26061 from malclocke/specify_ar_message_interpolation_names_in_i18n_guide
List names of error interpolation variables.
This commit is contained in:
commit
82ec6b3606
1 changed files with 1 additions and 1 deletions
|
@ -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}"`.
|
||||
|
||||
|
|
Loading…
Reference in a new issue