Skip to content

Commit

Permalink
Fix failing serialization test
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Nov 15, 2010
1 parent 845ab1d commit d8bcee2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/delayed/serialization/mongoid.rb
@@ -1,14 +1,14 @@
Mongoid::Document.class_eval do
yaml_as "tag:ruby.yaml.org,2002:Mongoid"

def self.yaml_new(klass, tag, val)
begin
klass.find(val['attributes']['_id'])
rescue Mongoid::Errors::DocumentNotFound
nil
raise Delayed::DeserializationError
end
end

def to_yaml_properties
['@attributes']
end
Expand Down

0 comments on commit d8bcee2

Please sign in to comment.