corrected missing 'end' in search controller method