Remove the 'rescue nil' in the search_form partial and added a if block to show a message when there are no hits and preventing from throwing an error when loading the form for the first time.
Edit search_form to capitalize precedences.