I have a form (using simple_form) which I want to implement support for translated error messages. All my translations appear with the exception of the error message.
My Customer model is:
class Customer < ActiveRecord::Base
attr_accessible :name, :phone, :email, :contact_method
validates_presence_of :phone, :email, :contact_method, :message => I18n.t(:required)
end
My fr.yml
file
fr:
name: 'Nom'
phone: 'Téléphone'
email: 'Courriel'
contact_method: 'Méthode de contact'
required: 'Requis'
My form is as follows:
= simple_form_for @customer do |f|
= f.input :name, label: t(:name)
= f.input :phone, label: t(:phone)
= f.input :email, label: t(:email)
Is there something I'm missing?