diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-01 12:16:08 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-01 12:16:08 -0300 |
commit | 32e296b6ffef68cd4937117819a368e610452370 (patch) | |
tree | 7a95b2b884bf029bd68b402d863cdbaef62db9e2 /activerecord/lib/active_record/associations.rb | |
parent | 37e0c153deea3822ff8ac03675768b966e23efb0 (diff) | |
download | rails-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.rb | 2 |
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 |