Rails 4 shows the boot counter for the csv file and hides the counter after the download is complete

I gave a link to download the csv file from the index action. After clicking the link, I need to show the image with spinners, since it takes a long time to download the csv file.

I can show the loader by calling the click jquery function as shown below. $ ("# csv_link"). on ('click', 'show_spinner');

Now my question is finished after loading the csv file, how to delete this boot counter?

because in the controller action I use the send_data method to load the csv file.

Therefore, I cannot name something like render: js => "hider_spinner".

Since it throws a double rendering error.

Can someone suggest me a solution?

thank

+4
source share

Source: https://habr.com/ru/post/1548230/


All Articles