fix sort order
This commit is contained in:
parent
fccdaccb8d
commit
8853b3efdb
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ class OrdersController < ApplicationController
|
|||
else
|
||||
sort = "ends DESC"
|
||||
end
|
||||
@orders = Order.closed.includes(:supplier).order(sort).page(params[:page]).per(@per_page)
|
||||
@orders = Order.closed.includes(:supplier).reorder(sort).page(params[:page]).per(@per_page)
|
||||
end
|
||||
|
||||
# Gives a view for the results to a specific order
|
||||
|
|
Loading…
Reference in a new issue