Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #58 from Exoth/master

Identity map + carrierwave-mongoid problem
  • Loading branch information...
commit 369a6dfaa4907426ee720e7a3b10642738e07a09 2 parents c2ed3be + 7260aaa
@rmm5t rmm5t authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/carrierwave/mongoid.rb
View
2  lib/carrierwave/mongoid.rb
@@ -56,7 +56,7 @@ def find_previous_model_for_#{column}
association = ancestors.inject(reloaded_parent) { |parent,(key,ancestor)| (parent.is_a?(Array) ? parent.find(ancestor.to_key.first) : parent).send(key) }
association.is_a?(Array) ? association.find(to_key.first) : association
else
- self.class.unscoped.find(to_key.first)
+ self.class.unscoped.for_ids(to_key.first).first
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.