freelancing-god/thinking-sphinx — Issue #315: Calling 'search' on a ActiveRecord::Relation should error
Author: mipearson
Created: 2011-12-09 03:22:55+00:00
State: open

eg:

irb(main):006:0> Redacted.search.total_count
=> 49743
irb(main):008:0> Redacted.where("1=0").search.total_count
=> 49743

AR sets the expectation that methods called on ActiveRecord relationship objects act only on the scope of that relation, not the underlying model. As TS can't honour this expectation it should error.