From 39ad75bda2e140008024543692e0c7019a5a4632 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 24 May 2009 00:04:45 +0200 Subject: [PATCH] associations guide: find_by_customer_id -> find_all_by_customer_id, thanks to Kai Krakow --- railties/guides/source/association_basics.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/association_basics.textile b/railties/guides/source/association_basics.textile index 06e72d33cb52c..ca10014ee0104 100644 --- a/railties/guides/source/association_basics.textile +++ b/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: -@orders = Order.find_by_customer_id(@customer.id) +@orders = Order.find_all_by_customer_id(@customer.id) @orders.each do |order| order.destroy end