Shopify/identity_cache — pull request #134 by dylanahsmith (2014-03-07 17:28:13+00:00)
Title: Fix fetch_multi to always compact results even when not using cache.

@arthurnn & @fbogsany for review

## Problem

Previously doing something like

```ruby
User.transaction do
users = User.fetch_multi(*user_ids)
end
```

could result in `nil` entries in the users array.

This bug became more apparent after doing `prefetch_associations` directly on the results of `find_batch`, however, the regression has been around for a while.

## Solution

compact the records array outside of the `IdentityCache.should_cache?` block.