Skip to content

Commit cbd9c93

Browse files
authored
fix: engine loads same files more than once (#168)
1 parent e05210f commit cbd9c93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/avo/engine.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ class Engine < ::Rails::Engine
3030

3131
# What to do on file change
3232
config.to_prepare do
33-
Dir.glob(avo_root_path + '/lib/avo/app/**/*.rb'.to_s).each { |c| load(c) }
33+
Dir.glob(avo_root_path + '/lib/avo/app/**/*.rb'.to_s).each { |c| require(c) }
3434
end
3535
end
3636

3737
if Rails.env.production?
38-
Dir.glob(avo_root_path + '/lib/avo/app/**/*.rb'.to_s).each { |c| load(c) }
38+
Dir.glob(avo_root_path + '/lib/avo/app/**/*.rb'.to_s).each { |c| require(c) }
3939

4040
Avo::App.boot
4141
end

0 commit comments

Comments
 (0)