models_preload.rb 312 B

1234567891011
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. # Ensure all models are preloaded, as Zammad uses reflections
  3. # which rely on all model classes being present.
  4. Rails.application.reloader.to_prepare do
  5. begin
  6. Models.all
  7. rescue ActiveRecord::StatementInvalid
  8. nil
  9. end
  10. end