Fix domain history csv

This commit is contained in:
dinsmol 2022-01-24 23:29:18 +03:00 committed by olegphenomenon
parent b18ad62834
commit a9b942dac0
2 changed files with 50 additions and 0 deletions

View file

@ -88,5 +88,17 @@ module Admin
params_copy
end
def render_by_format(page, filename)
respond_to do |format|
format.html { render page }
format.csv do
raw_csv = csv_generate
send_data raw_csv,
filename: "#{filename}_#{Time.zone.now.to_formatted_s(:number)}.csv",
type: "#{Mime[:csv]}; charset=utf-8"
end
end
end
end
end