Order guests within same table by color
All checks were successful
Check usage of free licenses / build-static-assets (pull_request) Successful in 39s
Add copyright notice / copyright_notice (pull_request) Successful in 1m2s
Run unit tests / unit_tests (pull_request) Successful in 1m56s

This commit is contained in:
Manuel Bustillo 2024-11-03 14:48:49 +01:00
parent 3ae90bfc4e
commit 1e23ad8e50

View File

@ -8,6 +8,7 @@ class TablesArrangementsController < ApplicationController
def show
Seat.joins(guest: :group)
.where(tables_arrangement_id: params[:id])
.order('guests.group_id')
.pluck(
:table_number,
Arel.sql("guests.first_name || ' ' || guests.last_name "), 'guests.id',