mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
💄 add username and date-time in exported file name
This commit is contained in:
parent
14ea59b623
commit
c619aed8f9
5 changed files with 21 additions and 12 deletions
|
@ -15,7 +15,7 @@ class ExportCsvController < ApplicationController
|
|||
def show
|
||||
params.require(:id)
|
||||
filename = params.fetch(:id)
|
||||
export_id = filename.split('-')[2].split('.')[0]
|
||||
export_id = filename.split('-')[-1].split('.')[0]
|
||||
export_initiated_by_user_id = 0
|
||||
export_initiated_by_user_id = UserExport.where(id: export_id)[0].user_id unless UserExport.where(id: export_id).empty?
|
||||
export_csv_path = UserExport.get_download_path(filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue