Compare commits

...

3 Commits

Author SHA1 Message Date
Renovate Bot
71b736b64b Update dependency ruby to v3.3.4
Some checks failed
Run unit tests / unit_tests (pull_request) Failing after 2m17s
2024-08-01 22:02:06 +00:00
eb759168a2 Merge pull request 'Display affinity groups in arrangements show action' (#22) from display-affinity-groups-in-arrangements-show into main
All checks were successful
Run unit tests / unit_tests (push) Successful in 2m50s
Reviewed-on: #22
2024-08-01 21:15:36 +00:00
5930350283 Display affinity groups in arrangements show action
All checks were successful
Run unit tests / unit_tests (pull_request) Successful in 3m27s
2024-08-01 23:11:54 +02:00
4 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
source "https://rubygems.org"
ruby "3.2.0"
ruby "3.3.4"
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.1.3", ">= 7.1.3.2"

View File

@ -289,7 +289,7 @@ DEPENDENCIES
web-console
RUBY VERSION
ruby 3.2.0p0
ruby 3.3.4p94
BUNDLED WITH
2.5.6

View File

@ -5,6 +5,8 @@ class TablesArrangementsController < ApplicationController
def show
@tables_arrangement = TablesArrangement.find(params[:id])
@seats = @tables_arrangement.seats.includes(:guest).group_by(&:table_number)
@seats = @tables_arrangement.seats
.includes(guest: %i[affinity_groups unbreakable_bonds])
.group_by(&:table_number)
end
end

View File

@ -10,7 +10,7 @@
<ul>
<% seats.each do |seat| %>
<li><%= seat.guest.full_name %></li>
<li><%= seat.guest.full_name %> (<%= seat.guest.affinity_groups.pluck(:name).join(", ") %>)</li>
<% end %>
</ul>
<% end %>