Displaying 1 result from an estimated 1 matches for "runtime_conditions".
2006 Jan 19
7
bug in has_many count?
...association with
:finder_sql, but no :counter_sql, it constructs the appropriate counter
sql by substituting the SELECT clause.
But has_many_association.rb doesn''t seem to do that -- it just passes
Base#count_by_sql the finder_sql, which doesn''t work so good.
def count(runtime_conditions = nil)
if @reflection.options[:counter_sql]
@reflection.klass.count_by_sql(@counter_sql)
elsif @reflection.options[:finder_sql]
@reflection.klass.count_by_sql(@finder_sql)
Am I missing something, or should I submit a patch?