lib/avromatic.rb in avromatic-4.1.1 vs lib/avromatic.rb in avromatic-4.2.0

- old
+ new

@@ -77,10 +77,14 @@ eager_load_models! end def self.eager_load_models=(models) - @eager_load_model_names = Array(models).map { |model| model.is_a?(Class) ? model.name : model } + @eager_load_model_names = Array(models).map { |model| model.is_a?(Class) ? model.name : model }.freeze + end + + def self.eager_load_models + @eager_load_model_names end def self.eager_load_models! @eager_load_model_names&.each { |model_name| model_name.constantize.register! } end