lib/avromatic.rb in avromatic-2.2.1 vs lib/avromatic.rb in avromatic-2.2.2

- old
+ new

@@ -83,12 +83,10 @@ def self.eager_load_models=(models) @eager_load_model_names = Array(models).map { |model| model.is_a?(Class) ? model.name : model } end def self.eager_load_models! - (@eager_load_model_names || []).each do |model_name| - nested_models.ensure_registered_model(model_name.constantize) - end + @eager_load_model_names&.each { |model_name| model_name.constantize.register! } end private_class_method :eager_load_models! end require 'avromatic/railtie' if defined?(Rails)