lib/mongomapper/associations/belongs_to_proxy.rb in djsun-mongomapper-0.3.3 vs lib/mongomapper/associations/belongs_to_proxy.rb in djsun-mongomapper-0.3.5

- old
+ new

@@ -4,15 +4,15 @@ def replace(doc) if doc doc.save if doc.new? id = doc.id end - + @owner.send("#{@association.foreign_key}=", id) reset end - protected + protected def find_target if association_id = @owner.send(@association.foreign_key) @association.klass.find_by_id(association_id) end end