I'm using button_to in a page for downloading a PDF file.
= button_to "Download Report", evaluation_report_attempt_path, method: :get, class: "btn btn-primary", data: { disable_with: "Downloading..."}
There is no page redirection happening here. After the file is downloaded, the button remains disabled. How do I re-enable the button after the function is completed?