Improved result by using sql order.
This commit is contained in:
parent
a7cdb592b7
commit
6b6a0a05e5
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ returns
|
||||||
'tickets.close_at IS NOT NULL AND tickets.close_at >= ? AND tickets.close_at < ?',
|
'tickets.close_at IS NOT NULL AND tickets.close_at >= ? AND tickets.close_at < ?',
|
||||||
params[:range_start],
|
params[:range_start],
|
||||||
params[:range_end],
|
params[:range_end],
|
||||||
).where(query, *bind_params).joins(tables)
|
).where(query, *bind_params).joins(tables).order(close_at: :asc)
|
||||||
count = 0
|
count = 0
|
||||||
assets = {}
|
assets = {}
|
||||||
ticket_ids = []
|
ticket_ids = []
|
||||||
|
|
Loading…
Reference in a new issue