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

Searchlogic with nested elements. #149

Open geektoo opened 12 years ago

geektoo commented 12 years ago

Hello, I need your help with my search method. I use search logic to manage filter. thats works. except the problem i have is to search between models.

my models are : Company has many departments departmanets has many employes.

I'm able to search company and departements. but how to search in the three models?

here is my gist of my setup https://gist.github.com/1195685

i tried my employe model to have a has_many :company, :through => :departments but nothing changed.

what i can do to use the employes models in my sql request?

thanks