Fix search by replacing find_by_sql with Arel