lib/mongomapper/associations/belongs_to_proxy.rb in jnunemaker-mongomapper-0.3.1 vs lib/mongomapper/associations/belongs_to_proxy.rb in jnunemaker-mongomapper-0.3.2
- old
+ new
@@ -6,16 +6,16 @@
doc.save if doc.new?
id = doc.id
end
@owner.send("#{@association.belongs_to_key_name}=", id)
- reload_target
+ reset
end
protected
def find_target
- if ref = @owner.send(@association.belongs_to_key_name)
- @association.klass.find(ref)
+ if association_id = @owner.send(@association.belongs_to_key_name)
+ @association.klass.find(association_id)
end
end
end
end
end