$('input[name="type"]').val('<%= params[:type].to_s %>'); $('#search_name').val('<%= params[:search].to_s %>'); $('.library-list-container').html('<%= j render(partial: 'library_list') %>')