Custom i18n error message gives InvalidPluralizationData?

I have a user and profile model. The user has a one-to-one relationship with the profile and the "accepts_nested_attributes_for profile".

I check the profile with two flags - that is, one of the agreements must be accepted before it is checked.

In any case, I want to configure the error message so as not to accept one of the fields, so I added the following to en.yml

activerecord:
  attributes:
    user: 
      profile:
        terms_and_conditions_a: 
          accepted: "You must accept the terms and conditions to continue"
        terms_and_conditions_b: 
          accepted: "You must accept the terms and conditions to continue"

You will see that the profile is nested under the user - this stops the “Profile”, placed at the beginning of the error message (as described here).

This gives me an error:

I18n::InvalidPluralizationData
translation data {:terms_and_conditions_a=>{:invalid=>"You must accept the terms and conditions to continue"}} can not be used with :count => 1

I really don't see him trying to pluralize, any help?

+5
1

,

activerecord:
  errors:
    models:
      user: 
        profile:
          attributes:
            terms_and_conditions_a: 
              accepted: "You must accept the terms and conditions to continue"

activerecord:
  attributes:
    user: 
      profile:
        terms_and_conditions_a: 
          accepted: "You must accept the terms and conditions to continue"

?

, , , 2, 3.

:

activerecord:
  errors:
    models:
      profile:
        attributes:
          terms_and_conditions_a: 
            accepted: "You must accept the terms and conditions to continue"
+3

All Articles