Compare commits

..

1 Commits

Author SHA1 Message Date
cb0e387c3a Refine guest controller
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 42s
Add copyright notice / copyright_notice (pull_request) Successful in 1m27s
Run unit tests / unit_tests (pull_request) Successful in 3m31s
2024-11-17 20:01:23 +01:00
3 changed files with 1 additions and 13 deletions

View File

@ -36,9 +36,6 @@ class Guest < ApplicationRecord
scope :potential, -> { where.not(status: %i[declined considered]) } scope :potential, -> { where.not(status: %i[declined considered]) }
after_save :recalculate_simulations, if: :saved_change_to_status? after_save :recalculate_simulations, if: :saved_change_to_status?
after_destroy :recalculate_simulations
has_many :seats, dependent: :delete_all
private private

View File

@ -4,7 +4,7 @@ Rails.application.routes.draw do
mount Rswag::Ui::Engine => '/api-docs' mount Rswag::Ui::Engine => '/api-docs'
mount Rswag::Api::Engine => '/api-docs' mount Rswag::Api::Engine => '/api-docs'
resources :groups, only: :index resources :groups, only: :index
resources :guests, only: %i[index create update destroy] do resources :guests, only: %i[index create update] do
post :bulk_update, on: :collection post :bulk_update, on: :collection
end end
resources :expenses, only: %i[index update] do resources :expenses, only: %i[index update] do

View File

@ -78,14 +78,5 @@ RSpec.describe 'guests', type: :request do
response_422 response_422
response_404 response_404
end end
delete('delete guest') do
tags 'Guests'
produces 'application/json'
parameter name: 'id', in: :path, type: :string, format: :uuid
response_empty_200
response_404
end
end end
end end