Jonas Gauffin wrote:

I've tried <%= error_messages_for 'interception_codes' %> but nothing is
Sorry. I mean that I tried with <%= error_messages_for 'hvd_codes' %>

IIRC error_messages_for simply looks for a global variable named after its parameter and parse the result 'errors' called on it.
So if you have a @hvdcode which is a HvdCode instance, just use 'hvdcode'. If you had a @foo instance of HvdCode, you'd use 'foo'...