mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user