aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-09-03 21:30:22 +0200
committerXavier Noria <fxn@hashref.com>2010-09-03 21:30:22 +0200
commit93acbf6bf31ca1802d7631c57da693a824456c4a (patch)
tree0c2be6d2c127abf50572dc86bf7dc182c00bb49c /activerecord/lib/active_record/associations.rb
parentd28438caf2342be3df8421ed92b95e0510be8ac0 (diff)
parentf8fb4651a7d8218befce48d66f4fadcea6ece37a (diff)
downloadrails-93acbf6bf31ca1802d7631c57da693a824456c4a.tar.gz
rails-93acbf6bf31ca1802d7631c57da693a824456c4a.tar.bz2
rails-93acbf6bf31ca1802d7631c57da693a824456c4a.zip
Merge remote branch 'docrails/master'
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rw-r--r--activerecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index f2feac0279..4bf206d589 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -602,7 +602,7 @@ module ActiveRecord
# other than the main one. If this is the case Active Record falls back to the previously
# used LEFT OUTER JOIN based strategy. For example
#
- # Post.find(:all, :include => [ :author, :comments ], :conditions => ['comments.approved = ?', true])
+ # Post.includes([:author, :comments]).where(['comments.approved = ?', true]).all
#
# This will result in a single SQL query with joins along the lines of:
# <tt>LEFT OUTER JOIN comments ON comments.post_id = posts.id</tt> and