Skip to content

Commit ea9593f

Browse files
author
James McKinney
committed
Don't run 'active_support/i18n' too early in Rails initialization
1 parent 9de7f44 commit ea9593f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/active_admin.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ module ActiveAdmin
5050
autoload :Views, 'active_admin/views'
5151

5252
class Railtie < ::Rails::Railtie
53-
# Add load paths straight to I18n, so engines and application can overwrite it.
54-
require 'active_support/i18n'
55-
I18n.load_path += Dir[File.expand_path('../active_admin/locales/*.yml', __FILE__)]
53+
config.after_initialize do
54+
# Add load paths straight to I18n, so engines and application can overwrite it.
55+
require 'active_support/i18n'
56+
I18n.load_path += Dir[File.expand_path('../active_admin/locales/*.yml', __FILE__)]
57+
end
5658
end
5759

5860
class << self

0 commit comments

Comments
 (0)