Add a deprecation message to activerecord.errors.

This commit is contained in:
José Valim 2010-01-07 01:45:57 +01:00
parent 190ce3ab37
commit 821a160a49

@ -67,5 +67,16 @@ class Railtie < Rails::Railtie
end
end
initializer "active_record.i18n_deprecation" do
require 'active_support/i18n'
begin
I18n.t(:"activerecord.errors", :raise => true)
warn "[DEPRECATION] \"activerecord.errors\" namespace is deprecated in I18n " <<
"yml files, please use just \"errors\" instead."
rescue Exception => e
# No message then.
end
end
end
end