From 6408308aab958841dcba6001a9f8abf52fb20009 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 16 Feb 2009 08:47:43 +0100 Subject: fixed example, closes LH ticket #59 --- railties/guides/source/active_record_querying.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides/source/active_record_querying.textile') diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index fa66627ece..7d4d4083fd 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -321,13 +321,13 @@ h5. Subset conditions If you want to find records using the +IN+ expression you can pass an array to the conditions hash: -Client.all(:include => "orders", :conditions => { :orders_count => [1,3,5] } +Client.all(:conditions => { :orders_count => [1,3,5] }) This code will generate SQL like this: -SELECT * FROM clients WHERE (clients.orders_count IN (1,2,3)) +SELECT * FROM clients WHERE (clients.orders_count IN (1,3,5)) h3. Find options -- cgit v1.2.3