From dbc5bea2712344664e0760dc287a7f53754b14d1 Mon Sep 17 00:00:00 2001 From: David Gay Date: Fri, 28 May 2021 20:56:36 -0400 Subject: Order BazaarOrders by name, price, then age --- app/controllers/bazaar_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/bazaar_controller.rb b/app/controllers/bazaar_controller.rb index b9a8f21..3492053 100644 --- a/app/controllers/bazaar_controller.rb +++ b/app/controllers/bazaar_controller.rb @@ -1,6 +1,6 @@ class BazaarController < ApplicationController def index - @bazaar_orders = BazaarOrder.all + @bazaar_orders = BazaarOrder.joins(:item).order("items.name ASC, price_each ASC, created_at ASC") @items = Item.all.order(:name) end -- cgit v1.2.3