Permalink
Browse files

pass arguments to all child saves, not just the chained save

  • Loading branch information...
1 parent 408f47d commit ed595a7da8f40a894eab7cb542ab0c0b60f0c759 @cainlevy committed Dec 17, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/nested_assignment.rb
View
2 lib/nested_assignment.rb
@@ -71,7 +71,7 @@ def valid_with_associated?(*args)
def create_or_update_with_associated(*args)
self.class.transaction do
create_or_update_without_associated(*args) &&
- without_recursion(:create_or_update){modified_associated.all?{|a| a.save}} &&
+ without_recursion(:create_or_update){modified_associated.all?{|a| a.save(*args)}} &&
deletable_associated.all?{|a| a.destroy}
end
end

0 comments on commit ed595a7

Please sign in to comment.