def self.search(search) if search search_condition = "%" + search + "%" find(:all, :conditions => ['jobTitle LIKE ? OR jobDescription LIKE ?', search_condition, search_condition]) end PG::InvalidTextRepresentation: ERROR: invalid input syntax for integer: "all" LINE 1: ...ngs".* FROM "postings" WHERE "postings"."id" IN ('all', '--... ^ : SELECT "postings".* FROM "postings" WHERE "postings"."id" IN ('all', '--- :conditions: - jobTitle LIKE ? OR jobDescription LIKE ? - "%drew%" - "%drew%" ')