mirror of
https://github.com/internetee/registry.git
synced 2025-06-09 06:04:56 +02:00
Add button to download filtered domains
This commit is contained in:
parent
b6df415fb9
commit
b65a2ca924
4 changed files with 18 additions and 1 deletions
|
@ -27,8 +27,17 @@ module Admin
|
|||
params[:q][:name_matches] = n_cache # we don't want to show wildcards in search form
|
||||
end
|
||||
end
|
||||
|
||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
||||
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
@domains
|
||||
end
|
||||
format.csv do
|
||||
raw_csv = @domains.to_csv
|
||||
send_data raw_csv, filename: 'domains.csv', type: "#{Mime[:csv]}; charset=utf-8"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue