mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Copy edits 64148ab96b (previous commit). Please squash at will.
This commit is contained in:
committed by
Xavier Noria
parent
5eaf012673
commit
97fd8c0ffd
@@ -704,7 +704,7 @@ SELECT categories.* FROM categories
|
||||
INNER JOIN posts ON posts.category_id = categories.id
|
||||
</sql>
|
||||
|
||||
Or, in English: "return a category object for all categories with posts". (You will see duplicate categories if more than one post has the same category. If you want unique posts, 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(:post).select("distinct(categories.id)").
|
||||
|
||||
h5. Joining Multiple Associations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user