mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Fix domain history csv
This commit is contained in:
parent
b18ad62834
commit
a9b942dac0
2 changed files with 50 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue