mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
refactored
This commit is contained in:
parent
8f17712232
commit
d2d31c049c
19 changed files with 32 additions and 112 deletions
|
@ -11,17 +11,7 @@ module Admin
|
|||
@disputes = sortable_dispute_query_for(Dispute.active.all, params[:q])
|
||||
@closed_disputes = sortable_dispute_query_for(Dispute.closed.all, params[:q], closed: true)
|
||||
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
render 'admin/disputes/index'
|
||||
end
|
||||
format.csv do
|
||||
raw_csv = @q.result.to_csv
|
||||
send_data raw_csv,
|
||||
filename: "disputes_#{Time.zone.now.to_formatted_s(:number)}.csv",
|
||||
type: "#{Mime[:csv]}; charset=utf-8"
|
||||
end
|
||||
end
|
||||
render_by_format('admin/disputes/index', 'disputes')
|
||||
end
|
||||
|
||||
# GET /admin/disputes/1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue