lib/mongo_mapper/associations.rb in mongo_mapper-unstable-2009.10.12 vs lib/mongo_mapper/associations.rb in mongo_mapper-unstable-2009.10.16

- old
+ new

@@ -46,19 +46,19 @@ end end end def define_dependent_callback_for_many(association) - return if association.embeddable? - after_destroy do |doc| - case association.options[:dependent] - when :destroy - doc.get_proxy(association).destroy_all - when :delete_all - doc.get_proxy(association).delete_all - when :nullify - doc.get_proxy(association).nullify + if !association.embeddable? + case association.options[:dependent] + when :destroy + doc.get_proxy(association).destroy_all + when :delete_all + doc.get_proxy(association).delete_all + when :nullify + doc.get_proxy(association).nullify + end end end end def define_dependent_callback_for_belongs_to(association)