mongo_mapper-unstable 2010.06.24 → 2010.06.25
Sign up to get free protection for your applications and to get access to all the features.
@@ -290,8 +290,6 @@ module MongoMapper
|
|
290
290
|
value = key.get(instance_variable_get(:"@#{key_name}"))
|
291
291
|
set_parent_document(key, value)
|
292
292
|
instance_variable_set(:"@#{key_name}", value)
|
293
|
-
else
|
294
|
-
raise KeyNotFound, "Could not find key: #{key_name.inspect}"
|
295
293
|
end
|
296
294
|
end
|
297
295
|
|
data/lib/mongo_mapper.rb
CHANGED
@@ -8,7 +8,6 @@ module MongoMapper
|
|
8
8
|
autoload :Connection, 'mongo_mapper/connection'
|
9
9
|
|
10
10
|
autoload :Error, 'mongo_mapper/exceptions'
|
11
|
-
autoload :KeyNotFound, 'mongo_mapper/exceptions'
|
12
11
|
autoload :DocumentNotFound, 'mongo_mapper/exceptions'
|
13
12
|
autoload :InvalidScheme, 'mongo_mapper/exceptions'
|
14
13
|
autoload :DocumentNotValid, 'mongo_mapper/exceptions'
|
@@ -387,9 +387,9 @@ class EmbeddedDocumentTest < Test::Unit::TestCase
|
|
387
387
|
doc[:name].should == 'string'
|
388
388
|
end
|
389
389
|
|
390
|
-
should "
|
390
|
+
should "return nil when not found" do
|
391
391
|
doc = @document.new(:name => 'string')
|
392
|
-
|
392
|
+
doc[:not_here].should be_nil
|
393
393
|
end
|
394
394
|
end
|
395
395
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2010
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 2010.06.
|
8
|
+
- 25
|
9
|
+
version: 2010.06.25
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- John Nunemaker
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-25 00:00:00 -05:00
|
18
18
|
default_executable: mmconsole
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|