i have a smart field that was calculated from a different table and i wanted to have search through that field. and the only option (at least what shown in the documentation) for me is to add my query conditions to the where_clause of the query, but in my case i need to add a table to the from_clause as well which i’m not sure how to work around.
my database structure is as follows:
- users table
- user_translations table: which contains the user names in translated format to support multilingual users.
the calculated value is the user name which is brought from the user_translations table and id like to have search through these names. i’m using the rails Globalize gem to translate the names if that helps.