def self.search(search)
if search
where('name OR username OR bio LIKE ?', "%#{search}%")
else
scoped
end
end
The above code works fine on my development server using SQLite, but since Heroku uses PostgreSQL it breaks (seems you can only use "OR" in truly boolean queries).
Is there a better way to implement this simple search so it works with PostgreSQL or do I have to move to a more complex search solution?