Skip to content

Commit

Permalink
force association proxy to load the target before propagating callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Sep 23, 2010
1 parent b2043ff commit 5878a32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo_mapper/plugins/embedded_callbacks.rb
Expand Up @@ -17,7 +17,7 @@ def run_callbacks(callback, &block)
embedded_docs = []

embedded_associations.each do |association|
embedded_docs += Array(get_proxy(association).target)
embedded_docs += Array(get_proxy(association).send(:load_target))
end

chain = embedded_docs.inject(block) do |block, doc|
Expand Down

0 comments on commit 5878a32

Please sign in to comment.