Permalink
Browse files

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.
  • Loading branch information...
1 parent a6b15bd commit 2be6df693ab076fa077ac7e0f7df6802f3748ce1 @clst clst committed Dec 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 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

0 comments on commit 2be6df6

Please sign in to comment.