mongo_adaptor 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,7 +35,7 @@ class MongoAdaptor
35
35
  @klass.new.tap do |model|
36
36
  model[:id] = result.delete('_id') if model.respond_to?(:id)
37
37
  result.each do |field,value|
38
- model[field] = value if model.respond_to? field
38
+ model[field] = value if model.members.map(&:to_s).include?(field.to_s)
39
39
  end
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  class MongoAdaptor
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_adaptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
12
+ date: 2012-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongo
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  segments:
124
124
  - 0
125
- hash: -1667775716187894524
125
+ hash: 18310851812254504
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: -1667775716187894524
134
+ hash: 18310851812254504
135
135
  requirements: []
136
136
  rubyforge_project:
137
137
  rubygems_version: 1.8.24