Skip to content

Commit bf6c296

Browse files
committed
Reload I18n backen after init
Somehow some translations are added to the load path after I18n has already been loaded.
1 parent 446e184 commit bf6c296

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

lib/active_admin/mongoid.rb

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@
1313
require 'active_admin/mongoid/helpers/collection'
1414
require 'active_admin/mongoid/criteria'
1515

16-
# module ActiveAdmin
17-
# module Mongoid
18-
# end
19-
#
20-
# class << self
21-
# alias setup_without_mongoid setup
22-
#
23-
# # Load monkey patches *after* the setup process
24-
# def setup *args, &block
25-
# setup_without_mongoid *args, &block
26-
#
27-
# end
28-
# end
29-
# end
16+
module ActiveAdmin
17+
module Mongoid
18+
class Railtie < ::Rails::Railtie
19+
config.after_initialize do
20+
I18n.backend.reload!
21+
end
22+
end
23+
end
24+
25+
# class << self
26+
# alias setup_without_mongoid setup
27+
#
28+
# # Load monkey patches *after* the setup process
29+
# def setup *args, &block
30+
# setup_without_mongoid *args, &block
31+
#
32+
# end
33+
# end
34+
end

0 commit comments

Comments
 (0)