-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export to CSV doesn't download directly #326
Comments
Tested on wice_grid 3.6.0.pre3, the same occurs. My partial has no extra HTML/ERB as well. This is driving me crazy!! |
It seems to be a problem with Turbolinks. When I disable it by removing However, I can't work out a way to make it work with Turbolinks enabled. Adding So now, when pressing the Export button in a page with tag disabled, the same HTML page with the CSV contents loads up again. At the moment, the only solution seems to be disabling Turbolinks for the entire project. Any suggestion is appreciated! Thanks |
Hi, I have similar issue and I'm also using wice_grid: 3.6.0.pre4 and Rails: 4.2.5.1 controller:
_g1_grid.html.erb:
edit: |
In
(I now have a local copy of |
…file method Fixes issue when trying to download a CSV export in combination with Turbolinks 5 (issue leikind#326).
I can confirm the problem and @nathanvda's fix (thanks!). However, I noticed there was also an deprecation warning in combination with Rails 5:
I fixed the deprecation by replacing |
…file method Fixes issue when trying to download a CSV export in combination with Turbolinks 5 (issue leikind#326) and fixes Rails 5 deprecation warning concerning `render :text`.
Whoops. Apparently @nathanvda's fix is needed after all. Probably messed up due to caching. So my PR now fixes two things: this issue and a deprecation warning. Apologies for the confusion! |
Plugin version: 3.6.0.pre4
Rails: 4.2.5.1
I followed the instructions outlined here: https://github.com/leikind/wice_grid#csv-export
Even though the export to CSV icon is visible on my index page, it is only clickable after I refresh the page. Then, when clicking on the export to CSV icon, a new tab is opened with the exported CSV in HTML format. If I refresh this page or simply access the link directly, the CSV file will finally be downloaded directly to the computer.
I have spent hours on this problem and have still not found a solution! Any help at all is really appreciated!
My controller:
` def index
@logbook = Logbook.all
end`
Just wanted to add that this is a great plugin and I appreciate the work put into it!
The text was updated successfully, but these errors were encountered: