nicolas-fricke / transfair

[DEPRECATED] Second, Rails-based approach to a web application for the Transfair-Project
https://www.transfair.co
3 stars 3 forks source link

Filters with relations to other tables #48

Open sdlp opened 12 years ago

sdlp commented 12 years ago

The gem will_filter, which we use right now has an option "customizing filters" (https://github.com/berk/will_filter/wiki/Customizing-Filters#AddingCustomConditions). This might allow us to create filters with relations to other models.

Use case: I am in service_partners#index where the filter is. I want every SP that is connected with any job that has the status "finished". Natural wording: Give me (no-freshman) Service Partners, that are not busy doing a job. -> What should happen: in the filter I should be able to select Employment(table that connects SP and job). Then there should appear a new box on the right where I can select job. Then there should appear a new box where I can select a status.