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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/mongoid-crud/ext.rb +2 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c411a601601a1afaa01eb15643ccbe2fcd3a69af
4
- data.tar.gz: 77f8d87b6340e12c103df514326f286e038e790f
3
+ metadata.gz: 331fed8400ff57e634ccca47b874c965b55aed1f
4
+ data.tar.gz: 03530f0bc89d235302527504411913d29f1ed64a
5
5
  SHA512:
6
- metadata.gz: fc3870be623bab71c6dbf223c43af363eed5fa39b0dd29a5893d5f055d6d56f6eacda338e7f0e20ce2240151453f1c234f165c4176e6dbf720d1e23fdaf5a620
7
- data.tar.gz: 5689025572e9f2b6955bcfee733a38d0434103d92bfe120b2644731944a3d3c0d35e879cc6e77a1f9fed6b4086dead232b6141257373db56fef85e40138746ba
6
+ metadata.gz: 99f142a28d7e9092d050ff591e88adba143416ef97bf933d5eb00d638e541c248813bb8a5d9bfb681f31b88376c179392a3428779ab2c1b42a0e0dfe698fa05a
7
+ data.tar.gz: 25d293e5a76241d6dad156889ab290ebb9e0dbdf5cd5a9d9fdce2e7c246459c10b1ced8deb3d7ff8a2d845c5da67d6cab8225a1662294afec4d200b99047962d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -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 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-crud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi