Skip to content
Browse files

fixed example for :finder_sql

people.* will not work when the alias is named p
  • Loading branch information...
1 parent b15e2be commit a6b15bd2dc35f07bfb073ffc0b0375c9318665c5 @clst clst committed Dec 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations.rb
View
2 activerecord/lib/active_record/associations.rb
@@ -1185,7 +1185,7 @@ module ClassMethods
# 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

0 comments on commit a6b15bd

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