lib/bullet/ext/object.rb in bullet-4.11.0 vs lib/bullet/ext/object.rb in bullet-4.11.1

- old
+ new

@@ -1,7 +1,7 @@ class Object def bullet_ar_key - if self.is_a? ActiveRecord::Base + if self.class.respond_to?(:primary_key) && self.class.primary_key "#{self.class}:#{self.send self.class.primary_key}" else "#{self.class}:#{self.id}" end end