Permalink
Browse files

associations guide: find_by_customer_id -> find_all_by_customer_id, t…

…hanks to Kai Krakow
  • Loading branch information...
1 parent 402f08f commit 39ad75bda2e140008024543692e0c7019a5a4632 @fxn fxn committed May 23, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/association_basics.textile
@@ -30,7 +30,7 @@ Now, suppose we wanted to add a new order for an existing customer. We'd need to
Or consider deleting a customer, and ensuring that all of its orders get deleted as well:
<ruby>
-@orders = Order.find_by_customer_id(@customer.id)
+@orders = Order.find_all_by_customer_id(@customer.id)
@orders.each do |order|
order.destroy
end

0 comments on commit 39ad75b

Please sign in to comment.