From 4db7a567d0fe782ec4b271b29bf8de92777ee44c Mon Sep 17 00:00:00 2001 From: Kevin Reintjes Date: Mon, 27 Jan 2020 15:18:50 +0100 Subject: [PATCH] Fix CSV export link in combination with Turbolinks 5 Fixes https://github.com/leikind/wice_grid/issues/326 --- CHANGELOG.md | 1 + vendor/assets/javascripts/wice_grid_processor.js.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fda789c6..7d1e5b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Fix bug in "Dangerous query methods" deprecation warning fix in custom order when using Arel.sql * Loosen lock on Kaminari +* Fix CSV export download link in combination with Turbolinks 5 (download the file instead of rendering it as text) ## 4.1.0 (28 November, 2018) diff --git a/vendor/assets/javascripts/wice_grid_processor.js.coffee b/vendor/assets/javascripts/wice_grid_processor.js.coffee index cef7f0f4..07d7cdd6 100644 --- a/vendor/assets/javascripts/wice_grid_processor.js.coffee +++ b/vendor/assets/javascripts/wice_grid_processor.js.coffee @@ -84,7 +84,7 @@ class WiceGridProcessor exportToCsv : -> - @visit @linkForExport + window.location = @linkForExport register : (func)->