From 256e317c390ef6f8ce9e033e2440a5665ef9d898 Mon Sep 17 00:00:00 2001 From: Don Petersen Date: Mon, 16 Apr 2012 16:22:40 -0700 Subject: Fix typo where a table name in a join was singular. --- guides/source/active_record_querying.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides') diff --git a/guides/source/active_record_querying.textile b/guides/source/active_record_querying.textile index 06d0aa4f74..58eae2ee0f 100644 --- a/guides/source/active_record_querying.textile +++ b/guides/source/active_record_querying.textile @@ -834,7 +834,7 @@ SELECT categories.* FROM categories INNER JOIN posts ON posts.category_id = categories.id -Or, in English: "return a Category object for all categories with posts". Note that you will see duplicate categories if more than one post has the same category. If you want unique categories, you can use Category.joins(:post).select("distinct(categories.id)"). +Or, in English: "return a Category object for all categories with posts". Note that you will see duplicate categories if more than one post has the same category. If you want unique categories, you can use Category.joins(:posts).select("distinct(categories.id)"). h5. Joining Multiple Associations -- cgit v1.2.3