Skip to content
This repository
Browse code

Added fix Mongoid 3's signature change of `for_ids`

  • Loading branch information...
commit 2c7a18509b02a4e690c34aacc0ab7f403b548275 1 parent f9a831d
Ryan McGeary authored

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

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

0 notes on commit 2c7a185

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