diff --git a/lib/sequel/plugins/bulk_audit.rb b/lib/sequel/plugins/bulk_audit.rb index afce718..8c8f122 100644 --- a/lib/sequel/plugins/bulk_audit.rb +++ b/lib/sequel/plugins/bulk_audit.rb @@ -12,7 +12,7 @@ def self.apply(model, opts={}) module SharedMethods def model_to_table_map - @model_to_table_map ||= ObjectSpace.each_object(Class).select do |klazz| + @@model_to_table_map ||= ObjectSpace.each_object(Class).select do |klazz| next if klazz.name.nil? klazz < Sequel::Model && klazz&.plugins&.include?(Sequel::Plugins::BulkAudit) end.map { |c| [c, c.table_name] }.to_h.invert