Skip to content

Commit

Permalink
Fix:turbolinksが悪さするので無効にする
Browse files Browse the repository at this point in the history
  • Loading branch information
j-omine committed Dec 8, 2018
1 parent a892853 commit a50fa83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/controllers/videos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def destroy_all
# zipファイルDL
def zip
dl_file = Video.create_dl_zip(@video.id)
stat = File::stat(dl_file)
send_file(dl_file, :filename => ERB::Util.url_encode(@video.name)+ '_' + Time.now.strftime('%Y%m%d%H%M%S') + '.zip', :length => stat.size)
send_file(dl_file, type: 'application/zip', :filename => ERB::Util.url_encode(@video.name)+ '_' + Time.now.strftime('%Y%m%d%H%M%S') + '.zip')
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/views/videos/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
td.text-right
= video.yets
td
= link_to zip_video_path(video), class: "btn btn-default btn-sm" do
= link_to zip_video_path(video), class: "btn btn-default btn-sm", data: { turbolinks: false } do
i.glyphicon.glyphicon-download-alt
| ダウンロード
= paginate(@videos)

0 comments on commit a50fa83

Please sign in to comment.