Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

A fix for the bug of not removing old uploads when the identity map i…

…s enabled.
  • Loading branch information...
commit 7260aaa39df95c97694038789958fd6b5c36320f 1 parent c2ed3be
Exoth authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/carrierwave/mongoid.rb
2  lib/carrierwave/mongoid.rb
@@ -56,7 +56,7 @@ def find_previous_model_for_#{column}
56 56 association = ancestors.inject(reloaded_parent) { |parent,(key,ancestor)| (parent.is_a?(Array) ? parent.find(ancestor.to_key.first) : parent).send(key) }
57 57 association.is_a?(Array) ? association.find(to_key.first) : association
58 58 else
59   - self.class.unscoped.find(to_key.first)
  59 + self.class.unscoped.for_ids(to_key.first).first
60 60 end
61 61 end
62 62

0 comments on commit 7260aaa

Please sign in to comment.
Something went wrong with that request. Please try again.