diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 838eb00863..c40982d738 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -99,7 +99,7 @@ module ActiveRecord elsif @reflection.options[:counter_sql] @reflection.klass.count_by_sql(@counter_sql) else - @reflection.klass.count(:conditions => @counter_sql) + @reflection.klass.count(:conditions => @counter_sql, :include => @reflection.options[:include]) end @target = [] and loaded if count == 0 |