From 0ffe8402a9f2f1a7cc4ced1abf1f21fd8f93578b Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 4 Jul 2016 11:15:29 +0800 Subject: [PATCH] FIX: SiteSettings not avaliable in initializers on dev env. --- config/initializers/005-site_settings.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/initializers/005-site_settings.rb b/config/initializers/005-site_settings.rb index 49bf07416..bb5ca5e5a 100644 --- a/config/initializers/005-site_settings.rb +++ b/config/initializers/005-site_settings.rb @@ -16,9 +16,9 @@ reload_settings = lambda { end } -if Rails.configuration.cache_classes - reload_settings.call -else +reload_settings.call + +if !Rails.configuration.cache_classes ActionDispatch::Reloader.to_prepare do reload_settings.call end