diff --git a/config/environments/production.rb b/config/environments/production.rb index 8677aa2..37234a3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,8 +1,9 @@ Entrydns::Application.configure do # Settings specified here will take precedence over those in config/application.rb - # Code is not reloaded between requests - config.cache_classes = true + # Code is not reloaded between requests, unless rake + # https://github.com/activescaffold/active_scaffold/issues/131 + config.cache_classes = (File.basename($0) == "rake" && ARGV.include?("db:migrate")) ? false : true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false diff --git a/config/initializers/as_rake_fix.rb.rb b/config/initializers/as_rake_fix.rb.rb deleted file mode 100644 index ece4743..0000000 --- a/config/initializers/as_rake_fix.rb.rb +++ /dev/null @@ -1,6 +0,0 @@ -# https://github.com/activescaffold/active_scaffold/issues/131 -class ApplicationController < ActionController::Base - def self.active_scaffold(*, &_) - super unless (File.basename($0) == "rake" && ARGV.include?("db:migrate")) - end -end \ No newline at end of file