diff options
author | David Gay <david@davidgay.org> | 2021-05-28 20:56:36 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-28 20:56:36 -0400 |
commit | dbc5bea2712344664e0760dc287a7f53754b14d1 (patch) | |
tree | 0223393156c48c6b26d866c91c5349b1362c408b | |
parent | c852b25f2d7ca5103c524e002ffc2d37aef8305e (diff) |
Order BazaarOrders by name, price, then age
-rw-r--r-- | app/controllers/bazaar_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |