rails/rails — Issue #4506: I18n documentation is wrong for ActiveModel translations
Author: primerano
Created: 2012-01-17 20:43:03+00:00
State: open

This page
http://guides.rubyonrails.org/i18n.html

has
I18n.t [:odd, :even], :scope => 'activerecord.errors.messages'

but it appears the activemodel errors drop the activerecord scope

1.9.3-p0 :001 > I18n.t [:odd, :even], :scope => 'activerecord.errors.messages'
=> "translation missing: en.activerecord.errors.messages.odd"

1.9.3-p0 :002 > I18n.t [:odd, :even], :scope => 'errors.messages'
=> ["must be odd", "must be even"]

This makes sense but that leaves 2 translations still in activerecord which is a bit confusing.

activerecord:
errors:
messages:
taken: "has already been taken"
record_invalid: "Validation failed: %{errors}"