提交 821a160a 编写于 作者: J José Valim

Add a deprecation message to activerecord.errors.

上级 190ce3ab
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册