changed :finder_sql example to select *

because with select p.* you can no longer use count(). Using count will result in an SQL error message.
This commit is contained in:
clst
2011-12-12 18:27:51 +01:00
parent a6b15bd2dc
commit 2be6df693a

View File

@@ -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 p.*
# SELECT DISTINCT *
# FROM people p, post_subscriptions ps
# WHERE ps.post_id = #{id} AND ps.person_id = p.id
# ORDER BY p.first_name