lib/mongomapper/associations/belongs_to_proxy.rb in jnunemaker-mongomapper-0.3.3 vs lib/mongomapper/associations/belongs_to_proxy.rb in jnunemaker-mongomapper-0.3.4

- old
+ new

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