fix sort order

This commit is contained in:
wvengen 2014-03-08 17:15:09 +01:00
parent fccdaccb8d
commit 8853b3efdb

View file

@ -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