aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorclst <cs@apl.li>2011-12-12 15:46:42 +0100
committerclst <cs@apl.li>2011-12-12 15:46:42 +0100
commita6b15bd2dc35f07bfb073ffc0b0375c9318665c5 (patch)
treeaa50a3deff9e03ce1f168d71a4b1833ea62ad0cb /activerecord
parentb15e2be6b03811258fcaad5b827960273df88d4a (diff)
downloadrails-a6b15bd2dc35f07bfb073ffc0b0375c9318665c5.tar.gz
rails-a6b15bd2dc35f07bfb073ffc0b0375c9318665c5.tar.bz2
rails-a6b15bd2dc35f07bfb073ffc0b0375c9318665c5.zip
fixed example for :finder_sql
people.* will not work when the alias is named p
Diffstat (limited to 'activerecord')
-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 98efdb90c8..3e24f3dee6 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1185,7 +1185,7 @@ module ActiveRecord
# has_many :subscribers, :through => :subscriptions, :source => :user
# has_many :subscribers, :class_name => "Person", :finder_sql => Proc.new {
# %Q{
- # SELECT DISTINCT people.*
+ # SELECT DISTINCT p.*
# FROM people p, post_subscriptions ps
# WHERE ps.post_id = #{id} AND ps.person_id = p.id
# ORDER BY p.first_name