diff options
author | Xavier Noria <fxn@hashref.com> | 2009-05-24 00:04:45 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-05-24 00:04:45 +0200 |
commit | 39ad75bda2e140008024543692e0c7019a5a4632 (patch) | |
tree | 780a4f3d03f7672f5d55ac3ba2fca8bfb4cc9824 | |
parent | 402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6 (diff) | |
download | rails-39ad75bda2e140008024543692e0c7019a5a4632.tar.gz rails-39ad75bda2e140008024543692e0c7019a5a4632.tar.bz2 rails-39ad75bda2e140008024543692e0c7019a5a4632.zip |
associations guide: find_by_customer_id -> find_all_by_customer_id, thanks to Kai Krakow
-rw-r--r-- | railties/guides/source/association_basics.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/association_basics.textile b/railties/guides/source/association_basics.textile index 06e72d33cb..ca10014ee0 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: <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 |