lib/avromatic.rb in avromatic-0.19.0 vs lib/avromatic.rb in avromatic-0.20.0
- old
+ new
@@ -49,10 +49,16 @@
# first initializes during boot-up and prior to each code reloading.
# For the first call during boot-up we do not want to clear the nested_models.
def self.prepare!(skip_clear: false)
unless skip_clear
nested_models.clear
- schema_store.public_send(:clear) if schema_store && schema_store.respond_to?(:clear)
+ if schema_store
+ if schema_store.respond_to?(:clear_schemas)
+ schema_store.clear_schemas
+ elsif schema_store.respond_to?(:clear)
+ schema_store.clear
+ end
+ end
end
eager_load_models!
end
def self.eager_load_models=(models)