diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-07 01:45:57 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-07 15:31:49 +0100 |
commit | 821a160a49529f449605e127e26b7376cc83d4d6 (patch) | |
tree | 9f27a344c368647e8defef6e0917d5fca888b49f /activerecord | |
parent | 190ce3ab37966957997cd18772d1260bf121c2e0 (diff) | |
download | rails-821a160a49529f449605e127e26b7376cc83d4d6.tar.gz rails-821a160a49529f449605e127e26b7376cc83d4d6.tar.bz2 rails-821a160a49529f449605e127e26b7376cc83d4d6.zip |
Add a deprecation message to activerecord.errors.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index a35edace19..55008271b7 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -67,5 +67,16 @@ module ActiveRecord 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 |