wedding-planner/app/controllers/tables_arrangements_controller.rb

11 lines
325 B
Ruby
Raw Normal View History

2024-07-24 20:43:44 +02:00
class TablesArrangementsController < ApplicationController
def index
@tables_arrangements = TablesArrangement.all.order(discomfort: :asc).limit(10)
end
def show
@tables_arrangement = TablesArrangement.find(params[:id])
2024-07-25 09:39:34 +02:00
@seats = @tables_arrangement.seats.includes(:guest).group_by(&:table_number)
2024-07-24 20:43:44 +02:00
end
end