$("#broadcast_file_form_<%= @broadcast.token %>").html("<%= j render(partial: "public/broadcasts/file_form", locals: { model: [@project, @broadcast], token: @broadcast.token }) %>");

var file_id = "#<%= dom_id(@files.first) %>"
if ($("#broadcast_file_list_<%= @broadcast.token %>").has(file_id).length == 0) {
  $("#broadcast_file_list_<%= @broadcast.token %>").html("<%= j render(partial: "broadcasts/file", collection: @files) %>");
  $("#broadcast_files_pagination_<%= @broadcast.token %>").html("<%= j will_paginate(@files) %>");
}

bsCustomFileInput.init();