From a00228c1a35578c4bf4d462eec977a50120288da Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 10 May 2012 20:48:23 -0300 Subject: Lazy load I18n --- activerecord/lib/active_record.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index ed26b4899f..210820062b 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -22,7 +22,6 @@ #++ require 'active_support' -require 'active_support/i18n' require 'active_model' require 'arel' require 'active_record_deprecated_finders' @@ -145,4 +144,6 @@ ActiveSupport.on_load(:active_record) do Arel::Table.engine = self end -I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' +ActiveSupport.on_load(:i18n) do + I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' +end -- cgit v1.2.3