refactoring app/views/search/index.html.erb