Topic: meta_search: can't combine 2 easy features

Hello everyone,

I'm new to this fantastic gem, but i'm already loving it!
however, i've got a little problem: i can't combine the "multi-level associations" feature with the "adding a new where" feature.

I need to do a search form for an invoice, that belongs to customer.
I need to search this invoice by "complete name", that is a combination of first_name, last_name and business_name.

So i would like to do a named_scope (a class method in rails3) called "complete_name"
and i would put in the form a text_field with name "customer_complete_name_contains"

It appears impossible. I need to do a scope inside the Invoice model, that joins the customers table to make it work, but it's not what i want, because i'd like to reuse my named_scope also for other searches

Anyone with some experience knows if it's possible to do this?

thank you very much for your attention

Last edited by vecchiaspugna (2011-05-27 15:10:13)