I will search with ransack in my Rails application for users by first and last name. In one text field for firstname and in one text field for lastname, the application user must be able to search for several parts of the name.
eg. the user will log in to Thomas Jeffrey, and this should result in:
SELECT FROM users WHERE firstname LIKE "%Thomas%" AND firstname LIKE "%Jeffrey%";
If I use firstname_cont, the result looks like this:
SELECT FROM users WHERE firstname LIKE "%Thomas Jeffrey%";
When I tried firstname_cont_all, I had something else.
Thanks for any hint.
source share