mm_uses_uuid 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/mm_uses_uuid.rb CHANGED
@@ -52,7 +52,7 @@ class UuidModel
52
52
  end
53
53
 
54
54
  def self.find(*ids)
55
- ids.flatten!
55
+ ids.flatten!.uniq!
56
56
  ids_by_class = ids.each_with_object(Hash.new { |hash, key| hash[key] = [] }) do |id, hsh|
57
57
  lsn = id.to_s[-1].hex
58
58
  klass = @@lsn_class_lookup[lsn]
@@ -66,6 +66,7 @@ class UuidModel
66
66
  end
67
67
 
68
68
  def self.find!(*ids)
69
+ ids.flatten!.uniq!
69
70
  raise MongoMapper::DocumentNotFound, "Couldn't find without an ID" if ids.size == 0
70
71
  find(*ids).tap do |result|
71
72
  if result.nil? || ids.size != Array(result).size
@@ -1,3 +1,3 @@
1
1
  module MmUsesUuid
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mm_uses_uuid
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.14
5
+ version: 0.0.15
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jonathan Chambers