STI and nested validation message I18n namespace

Hey, so I’ve been working in an project that requires an STI implementation followed by a nested form.

After finishing-up the basic implementation I’ve runned into a hard time trying to setup well formated errors messages, and couldn’t find a possible solution, and looking at activemodel codebase it seems that this could be a possible room for improvement.

I’ve created a gist to sample to exemplify the issue in here

By looking at that we can see that the namespace used to match the translation always fall through the association name (animals). But since we’re dealing with STI here, it would way more sense if we display the model name translate as a base name rather than just association name.

of course it still make sense to scope the message key as the association name to avoid any confusion, but would be definatelly a gain to consider the sti during the full_messages method

any toughts?