From b7aa2a7bca84129b6f9421a725805f680ea2148c Mon Sep 17 00:00:00 2001 From: David Elliott Date: Fri, 20 Sep 2013 10:50:22 -0700 Subject: [PATCH] Pass $item as first arg to afterDestroy for those who don't want this getting hijacked --- jquery.nested_attributes.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.nested_attributes.coffee b/jquery.nested_attributes.coffee index f3d11cf..5ec69d7 100644 --- a/jquery.nested_attributes.coffee +++ b/jquery.nested_attributes.coffee @@ -256,7 +256,7 @@ class NestedAttributes $item.append($destroyField) $destroyField.val(true).change() - @options.afterDestroy.call($item, index, itemIsNew) if (@options.afterDestroy) + @options.afterDestroy.call($item, $item, index, itemIsNew) if (@options.afterDestroy) # Remove this item from the items list @refreshItems()