diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index f5533937..591f750a 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -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