Skip to content
Browse files

syntax error joining/including models

syntax error joining/including models
  • Loading branch information...
1 parent c365986 commit ac35f72f30c47298a20a90c8c537db888b463bbb @shernade shernade committed Nov 18, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 guides/source/
4 guides/source/
@@ -1101,7 +1101,7 @@ Active Record lets you eager load any number of associations with a single `Mode
#### Array of Multiple Associations
-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.
-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.

0 comments on commit ac35f72

Please sign in to comment.
Something went wrong with that request. Please try again.