diff --git a/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb b/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb index ccb58490..6691afc9 100644 --- a/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb +++ b/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb @@ -122,7 +122,9 @@ def self.create_service_model_from_name(name) def self.create_service_model(ar_model) file_path = model_to_file_path(ar_model) if File.exist?(file_path) - require file_path + # class reloading in development causes require to no-op when it should load + # since we will never require this file, using load is not a big loss + load file_path model_name_from_active_record_model(ar_model).safe_constantize else dynamic_service_model_creation(ar_model, service_model_superclass(ar_model))