aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-01 12:16:08 -0300
committerEmilio Tagua <miloops@gmail.com>2010-09-01 12:16:08 -0300
commit32e296b6ffef68cd4937117819a368e610452370 (patch)
tree7a95b2b884bf029bd68b402d863cdbaef62db9e2 /activerecord/lib/active_record/associations.rb
parent37e0c153deea3822ff8ac03675768b966e23efb0 (diff)
downloadrails-32e296b6ffef68cd4937117819a368e610452370.tar.gz
rails-32e296b6ffef68cd4937117819a368e610452370.tar.bz2
rails-32e296b6ffef68cd4937117819a368e610452370.zip
Use new finders syntax in docs.
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