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 else
sort = "ends DESC" sort = "ends DESC"
end 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 end
# Gives a view for the results to a specific order # Gives a view for the results to a specific order