locales: fix translation of champ value
Due to the extra 's', the names of Champs attributes were never translated.
This commit is contained in:
parent
12166e29bb
commit
a716713ed6
3 changed files with 5 additions and 5 deletions
|
@ -2,8 +2,8 @@ class Champs::DecimalNumberChamp < Champ
|
|||
validates :value, numericality: {
|
||||
allow_nil: true,
|
||||
allow_blank: true,
|
||||
message: -> (object, data) {
|
||||
"« #{object.libelle} » " + object.errors.generate_message(data[:attribute].downcase, :not_a_number)
|
||||
message: -> (object, _data) {
|
||||
"« #{object.libelle} » " + object.errors.generate_message(:value, :not_a_number)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue