binarylogic / searchlogic

Searchlogic provides object based searching, common named scopes, and other useful tools.
http://rdoc.info/projects/binarylogic/searchlogic
MIT License
1.4k stars 133 forks source link

has_many :through => STI #146

Open DCarper opened 13 years ago

DCarper commented 13 years ago

Hi guys, I'm using Rails 2.3.5 and searchlogic 2.4.14

I'm trying to build a search form to specify conditions on a has many through relationship, where the join model is actually inheriting from another model via STI.

The query that is generated never specifies the type so it's actually hitting the superclass, not the subclass.

Here is a gist with relevant code and query. https://gist.github.com/69ded6c1f814c8276d64

I tried looking in the source to see if I could work something out but didn't really get anywhere.

Dan