From ac35f72f30c47298a20a90c8c537db888b463bbb Mon Sep 17 00:00:00 2001 From: Sergio Date: Mon, 18 Nov 2013 18:39:06 +0100 Subject: syntax error joining/including models syntax error joining/including models --- guides/source/active_record_querying.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source') diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 7d641b67ba..0f9b2c28a5 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1101,7 +1101,7 @@ Active Record lets you eager load any number of associations with a single `Mode #### Array of Multiple Associations ```ruby -Post.includes(:category, :comments) +Post.includes(:category, :comment) ``` This loads all the posts and the associated category and comments for each post. @@ -1121,7 +1121,7 @@ Even though Active Record lets you specify conditions on the eager loaded associ However if you must do this, you may use `where` as you would normally. ```ruby -Post.includes(:comments).where("comments.visible" => true) +Post.includes(:comment).where("comments.visible" => true) ``` This would generate a query which contains a `LEFT OUTER JOIN` whereas the `joins` method would generate one using the `INNER JOIN` function instead. -- cgit v1.2.3