Rails Active Record Search - Name includes a word Try using: variable = "Fox" Project.where("project_name like ?", "%#{variable}%")