$("#files").html("<%= j render(partial: 'file', collection: @files) %>"); $("form input[type='search']").val("<%= params[:query] %>"); $("#files_pagination").html("<%= j will_paginate(@files) %>");