diff options
author | clst <cs@apl.li> | 2011-12-12 18:27:51 +0100 |
---|---|---|
committer | clst <cs@apl.li> | 2011-12-12 18:27:51 +0100 |
commit | 2be6df693ab076fa077ac7e0f7df6802f3748ce1 (patch) | |
tree | 4ca638fc44bf7be9078ad7670aa5a9bc5ed45677 /activerecord/lib | |
parent | a6b15bd2dc35f07bfb073ffc0b0375c9318665c5 (diff) | |
download | rails-2be6df693ab076fa077ac7e0f7df6802f3748ce1.tar.gz rails-2be6df693ab076fa077ac7e0f7df6802f3748ce1.tar.bz2 rails-2be6df693ab076fa077ac7e0f7df6802f3748ce1.zip |
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.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 3e24f3dee6..a7600a07d8 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 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 |