aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-05-10 20:48:23 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2012-05-11 19:00:25 -0300
commita00228c1a35578c4bf4d462eec977a50120288da (patch)
tree20330d2bf593e1baa8271655f8f90272338245be /activemodel/lib
parentabd6f4a2b14fb048c95b3211f2c9fe5f1c006bc0 (diff)
downloadrails-a00228c1a35578c4bf4d462eec977a50120288da.tar.gz
rails-a00228c1a35578c4bf4d462eec977a50120288da.tar.bz2
rails-a00228c1a35578c4bf4d462eec977a50120288da.zip
Lazy load I18n
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb
index 2586147a20..7503fb7929 100644
--- a/activemodel/lib/active_model.rb
+++ b/activemodel/lib/active_model.rb
@@ -59,5 +59,6 @@ module ActiveModel
end
end
-require 'active_support/i18n'
-I18n.load_path << File.dirname(__FILE__) + '/active_model/locale/en.yml'
+ActiveSupport.on_load(:i18n) do
+ I18n.load_path << File.dirname(__FILE__) + '/active_model/locale/en.yml'
+end