How do I write condition statement in find or paginate method to allow users search in Project and Project Category names simultaneously?
Now my code looks like this
@projects = Project.paginate :per_page => 20, :page => params[:page], :conditions => ['name LIKE ?', "%#{params[:search]}%"]
So I have also Category table with name field. How do I combine those two names together in this search query?