mongoid-crud 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/mongoid-crud/ext.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 331fed8400ff57e634ccca47b874c965b55aed1f
|
4
|
+
data.tar.gz: 03530f0bc89d235302527504411913d29f1ed64a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f142a28d7e9092d050ff591e88adba143416ef97bf933d5eb00d638e541c248813bb8a5d9bfb681f31b88376c179392a3428779ab2c1b42a0e0dfe698fa05a
|
7
|
+
data.tar.gz: 25d293e5a76241d6dad156889ab290ebb9e0dbdf5cd5a9d9fdce2e7c246459c10b1ced8deb3d7ff8a2d845c5da67d6cab8225a1662294afec4d200b99047962d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
data/lib/mongoid-crud/ext.rb
CHANGED
@@ -72,6 +72,8 @@ module Mongoid
|
|
72
72
|
query = Hash[*args.select{|e| e.class <= ::Hash }]
|
73
73
|
classes = args.select{|e| e.class <= ::Class }
|
74
74
|
|
75
|
+
[@@parent_sym,@@parent_sym.to_s].each{|e| query.delete(e) unless query[e].nil? }
|
76
|
+
|
75
77
|
raise(ArgumentError,"to #{__method__} document, you need :_id") if query[:_id].nil?
|
76
78
|
var= self._find(query.delete(:_id))
|
77
79
|
query.each{|k,v| var[k]= v }
|