flyerhzm/bullet — pull request #178 by kenips (2014-07-22 13:10:43+00:00)
Title: Compact all records before sending them to preloaders_on

This is an update to #173 / #175. I realize that preloaders_on would still fail if records come in as [nil]. Further looking at Rails code it is actually handled [here](https://github.com/rails/rails/blob/a335e10347e30b885d077cd9e638ee8840ed164a/activerecord/lib/active_record/associations/preloader.rb#L143) for both weeding out nil records and setting class names. Assuming that the current assumption `records.first.class.name !~ /^HABTM_/` still holds (since, if you look at that block of code, it specifically says that "Not all records have the same class") then I think we're good.