mm_uses_uuid 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module MmUsesUuid
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/mm_uses_uuid.rb CHANGED
@@ -63,15 +63,23 @@ module MmUsesUuid
63
63
  module ClassMethods
64
64
 
65
65
  def find(*args)
66
-
66
+ args = convert_ids_to_BSON(args)
67
+ super(args)
68
+ end
69
+
70
+ def find!(*args)
71
+ args = convert_ids_to_BSON(args)
72
+ super(args)
73
+ end
74
+
75
+ def convert_ids_to_BSON(args)
67
76
  args.flatten!
68
77
  if args.size > 1
69
78
  args.map! {|id| BsonUuid.to_mongo(id)}
70
79
  else
71
80
  args = BsonUuid.to_mongo(args.first)
72
81
  end
73
- super(args)
74
-
82
+ args
75
83
  end
76
84
 
77
85
  def new(params = {})
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jonathan Chambers
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-01-01 00:00:00 +00:00
17
+ date: 2012-02-27 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency