mongodb_model 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,8 +45,7 @@ module Mongo::Model::Crud
45
45
 
46
46
  def destroy_all selector = {}, options = {}
47
47
  success = true
48
- collection = options[:collection] || self.collection
49
- each(selector){|o| success = false unless o.destroy}
48
+ each(selector){|o| success = false unless o.destroy options}
50
49
  success
51
50
  end
52
51
 
@@ -1,4 +1,5 @@
1
1
  require 'file_model'
2
+
2
3
  module Mongo::Model::FileModel
3
4
  inherit ::FileModel::Helper
4
5
 
@@ -9,8 +9,7 @@ describe 'File Model' do
9
9
  class ImageFile; end
10
10
 
11
11
  class Unit
12
- inherit Mongo::Model
13
- inherit Mongo::Model::FileModel
12
+ inherit Mongo::Model, Mongo::Model::FileModel
14
13
  collection :units
15
14
 
16
15
  attr_accessor :name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongodb_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-19 00:00:00.000000000Z
12
+ date: 2011-09-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongodb
16
- requirement: &2781780 !ruby/object:Gem::Requirement
16
+ requirement: &2832660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2781780
24
+ version_requirements: *2832660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: validatable2
27
- requirement: &2781540 !ruby/object:Gem::Requirement
27
+ requirement: &2832420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2781540
35
+ version_requirements: *2832420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: ruby_ext
38
- requirement: &2781300 !ruby/object:Gem::Requirement
38
+ requirement: &2832180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2781300
46
+ version_requirements: *2832180
47
47
  description:
48
48
  email:
49
49
  executables: []