Skip to content

Commit be127e0

Browse files
committed
Per-env eager load settings for Rails 4
rapid7#5234 MSP-12612
1 parent 81b8a91 commit be127e0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

config/application.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ class Application < Rails::Application
3737

3838
config.paths['log'] = "#{Msf::Config.log_directory}/#{Rails.env}.log"
3939
config.paths['config/database'] = [Metasploit::Framework::Database.configurations_pathname.try(:to_path)]
40+
41+
case Rails.env
42+
when "development"
43+
config.eager_load = false
44+
when "test"
45+
config.eager_load = false
46+
when "production"
47+
config.eager_load = true
48+
end
4049
end
4150
end
4251
end

0 commit comments

Comments
 (0)