From 01a4dc3e85ef3f50faefd9b3bd3a36459cb48970 Mon Sep 17 00:00:00 2001 From: Fox Date: Mon, 12 Mar 2018 08:46:20 +0300 Subject: [PATCH] fixed issue #1 --- lib/sequel/plugins/bulk_audit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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