Compare commits

...

17 Commits

Author SHA1 Message Date
54d891070c Merge pull request 'Update dependency factory_bot_rails to v6.5.0' (#281) from renovate/factory_bot_rails-6.x-lockfile into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 1m10s
Run unit tests / build-static-assets (push) Successful in 9m7s
Reviewed-on: #281
2025-06-15 10:59:23 +00:00
b32af61358 Merge pull request 'Return guests ordered by invitation within same group' (#282) from guests-order into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 56s
Run unit tests / build-static-assets (push) Successful in 8m45s
Reviewed-on: #282
2025-06-15 09:35:43 +00:00
7f4bd8a8df Return guests ordered by invitation within same group
All checks were successful
Run unit tests / copyright_notice (pull_request) Successful in 53s
Run unit tests / rubocop (pull_request) Successful in 1m4s
Run unit tests / unit_tests (pull_request) Successful in 1m50s
Run unit tests / check-licenses (pull_request) Successful in 43s
Run unit tests / build-static-assets (pull_request) Successful in 8m26s
2025-06-15 11:24:57 +02:00
Renovate Bot
46b59ac617 Update dependency factory_bot_rails to v6.5.0
All checks were successful
Run unit tests / copyright_notice (pull_request) Successful in 2m33s
Run unit tests / rubocop (pull_request) Successful in 3m49s
Run unit tests / check-licenses (pull_request) Successful in 4m17s
Run unit tests / unit_tests (pull_request) Successful in 13m40s
Run unit tests / build-static-assets (pull_request) Successful in 12m30s
2025-06-14 02:04:16 +00:00
f02a6b6a3d Merge pull request 'Allow updating the status of guests from unauthenticated sessions' (#280) from guest-update-from-invitation into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 54s
Run unit tests / build-static-assets (push) Successful in 8m32s
Reviewed-on: #280
2025-06-12 21:26:00 +00:00
efb5cf64f5 Minor changes
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 1m27s
Run unit tests / copyright_notice (pull_request) Successful in 2m45s
Run unit tests / check-licenses (pull_request) Successful in 2m46s
Run unit tests / unit_tests (pull_request) Successful in 4m26s
Run unit tests / build-static-assets (pull_request) Successful in 20m24s
2025-06-12 23:01:03 +02:00
9a99981f67 Allow updating the status of guests from unauthenticated sessions
Some checks failed
Run unit tests / rubocop (pull_request) Failing after 1m4s
Run unit tests / check-licenses (pull_request) Successful in 1m7s
Run unit tests / copyright_notice (pull_request) Successful in 1m38s
Run unit tests / unit_tests (pull_request) Successful in 3m57s
Run unit tests / build-static-assets (pull_request) Successful in 26m1s
2025-06-12 22:53:50 +02:00
9e9ee0c995 Merge pull request 'Define a new public endpoint to get information about an invitation' (#279) from invitations-show-endpoint into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 56s
Run unit tests / build-static-assets (push) Successful in 8m15s
Reviewed-on: #279
2025-06-12 17:32:27 +00:00
82a39bce82 Define a new public endpoint to get information about an invitation
All checks were successful
Run unit tests / copyright_notice (pull_request) Successful in 40s
Run unit tests / rubocop (pull_request) Successful in 52s
Run unit tests / check-licenses (pull_request) Successful in 56s
Run unit tests / unit_tests (pull_request) Successful in 1m38s
Run unit tests / build-static-assets (pull_request) Successful in 8m29s
2025-06-12 19:21:53 +02:00
d953e7c4a2 Merge pull request 'Update dependency ruby to v3.4.3' (#254) from renovate/ruby-3.x into main
All checks were successful
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / rubocop (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 52s
Run unit tests / build-static-assets (push) Successful in 17m25s
Reviewed-on: #254
2025-06-11 19:27:11 +00:00
4e4845a8c3 Merge pull request 'Build docker image in the main branch' (#277) from run-build into main
All checks were successful
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / rubocop (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 2m30s
Run unit tests / build-static-assets (push) Successful in 17m0s
Reviewed-on: #277
2025-06-11 19:03:20 +00:00
60436caf5b Merge branch 'main' into renovate/ruby-3.x
All checks were successful
Run unit tests / copyright_notice (pull_request) Successful in 52s
Run unit tests / rubocop (pull_request) Successful in 1m28s
Run unit tests / check-licenses (pull_request) Successful in 1m27s
Run unit tests / unit_tests (pull_request) Successful in 2m34s
Run unit tests / build-static-assets (pull_request) Successful in 25m34s
2025-06-11 18:58:58 +00:00
7f4554d21a Build docker image in the main branch
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 31s
Run unit tests / check-licenses (pull_request) Successful in 41s
Run unit tests / copyright_notice (pull_request) Successful in 42s
Run unit tests / unit_tests (pull_request) Successful in 1m13s
Run unit tests / build-static-assets (pull_request) Successful in 9m47s
2025-06-11 20:49:50 +02:00
509aca79bf Merge pull request 'Prevent PR jobs from running in the main branch' (#276) from avoid-checks-main into main
All checks were successful
Run unit tests / rubocop (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 56s
Run unit tests / build-static-assets (push) Has been skipped
Reviewed-on: #276
2025-06-11 17:20:39 +00:00
4efb912e38 Merge branch 'main' into renovate/ruby-3.x
Some checks failed
Run unit tests / check-licenses (pull_request) Failing after 1m6s
Run unit tests / rubocop (pull_request) Failing after 1m11s
Run unit tests / copyright_notice (pull_request) Successful in 2m47s
Run unit tests / unit_tests (pull_request) Failing after 3m3s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-06-01 18:03:21 +00:00
bf35ca5f6e Upgrade to ruby 3.4.3
Some checks failed
Run unit tests / rubocop (pull_request) Failing after 37s
Run unit tests / check-licenses (pull_request) Failing after 37s
Run unit tests / copyright_notice (pull_request) Successful in 1m3s
Run unit tests / unit_tests (pull_request) Failing after 1m24s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-04-25 07:39:13 +02:00
Renovate Bot
8cd4efc6f5 Update dependency ruby to v3.4.3
Some checks failed
Run unit tests / check-licenses (pull_request) Failing after 2m11s
Run unit tests / rubocop (pull_request) Failing after 2m22s
Run unit tests / copyright_notice (pull_request) Successful in 2m43s
Run unit tests / unit_tests (pull_request) Failing after 2m46s
Run unit tests / build-static-assets (pull_request) Has been skipped
2025-04-24 02:06:21 +00:00
9 changed files with 34 additions and 24 deletions

View File

@ -124,9 +124,6 @@ jobs:
timeout-minutes: 30
needs:
- unit_tests
- rubocop
- check-licenses
- copyright_notice
steps:
- uses: actions/checkout@v4
with:

View File

@ -1 +1 @@
ruby-3.4.2
ruby-3.4.3

View File

@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.4.2
ARG RUBY_VERSION=3.4.3
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base
# Rails app lives here

View File

@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.4.2
ARG RUBY_VERSION=3.4.3
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
# Rails app lives here

View File

@ -2,7 +2,7 @@
source 'https://rubygems.org'
ruby '3.4.2'
ruby '3.4.3'
gem 'bootsnap', require: false
gem 'csv'
gem 'importmap-rails'

View File

@ -85,7 +85,7 @@ GEM
base64 (0.3.0)
bcrypt (3.1.20)
benchmark (0.4.1)
bigdecimal (3.2.1)
bigdecimal (3.2.2)
bindex (0.8.1)
bootsnap (1.18.6)
msgpack (~> 1.2)
@ -115,11 +115,11 @@ GEM
et-orbi (1.2.11)
tzinfo
execjs (2.9.1)
factory_bot (6.4.6)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
factory_bot (6.5.4)
activesupport (>= 6.1.0)
factory_bot_rails (6.5.0)
factory_bot (~> 6.5)
railties (>= 6.1.0)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
fugit (1.11.1)
@ -245,7 +245,7 @@ GEM
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.8.1)
rack (3.1.15)
rack (3.1.16)
rack-cors (3.0.0)
logger
rack (>= 3.0.14)
@ -491,7 +491,7 @@ CHECKSUMS
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
bcrypt (3.1.20) sha256=8410f8c7b3ed54a3c00cd2456bf13917d695117f033218e2483b2e40b0784099
benchmark (0.4.1) sha256=d4ef40037bba27f03b28013e219b950b82bace296549ec15a78016552f8d2cce
bigdecimal (3.2.1) sha256=1f68631e876c6aba8fe9b84b36983c55ad3293ff2d1ad4c6f115bde1e9d802e3
bigdecimal (3.2.2) sha256=39085f76b495eb39a79ce07af716f3a6829bc35eb44f2195e2753749f2fa5adc
bindex (0.8.1) sha256=7b1ecc9dc539ed8bccfc8cb4d2732046227b09d6f37582ff12e50a5047ceb17e
bootsnap (1.18.6) sha256=0ae2393c1e911e38be0f24e9173e7be570c3650128251bf06240046f84a07d00
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
@ -511,8 +511,8 @@ CHECKSUMS
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
et-orbi (1.2.11) sha256=d26e868cc21db88280a9ec1a50aa3da5d267eb9b2037ba7b831d6c2731f5df64
execjs (2.9.1) sha256=e8fd066f6df60c8e8fbebc32c6fb356b5212c77374e8416a9019ca4bb154dcfb
factory_bot (6.4.6) sha256=1a9486ce98d318d740d8f5804b885a8265a28f326ecf2bcd4ce9fb27a71a6e04
factory_bot_rails (6.4.3) sha256=ea73ceac1c0ff3dc11fff390bf2ea8a2604066525ed8ecd3b3bc2c267226dcc8
factory_bot (6.5.4) sha256=4707fb7d80a7c14d71feb069460587bfc342e4ff1ef28097e0ad69d5ddfce613
factory_bot_rails (6.5.0) sha256=4a7b61635424a57cc60412a18b72b9dcfb02fabfce2c930447a01dce8b37c0a2
faker (3.5.1) sha256=1ad1fbea279d882f486059c23fe3ddb816ccd1d7052c05a45014b4450d859bfc
fugit (1.11.1) sha256=e89485e7be22226d8e9c6da411664d0660284b4b1c08cacb540f505907869868
globalid (1.2.1) sha256=70bf76711871f843dbba72beb8613229a49429d1866828476f9c9d6ccc327ce9
@ -572,7 +572,7 @@ CHECKSUMS
puma (6.6.0) sha256=f25c06873eb3d5de5f0a4ebc783acc81a4ccfe580c760cfe323497798018ad87
raabro (1.4.0) sha256=d4fa9ff5172391edb92b242eed8be802d1934b1464061ae5e70d80962c5da882
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
rack (3.1.15) sha256=d12b3e9960d18a26ded961250f2c0e3b375b49ff40dbe6786e9c3b160cbffca4
rack (3.1.16) sha256=efb5606c351efc56b85b10c3493055d0d35209d23f44792ec4e1183eb0234635
rack-cors (3.0.0) sha256=7b95be61db39606906b61b83bd7203fa802b0ceaaad8fcb2fef39e097bf53f68
rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
@ -634,7 +634,7 @@ CHECKSUMS
zeitwerk (2.7.3) sha256=b2e86b4a9b57d26ba68a15230dcc7fe6f040f06831ce64417b0621ad96ba3e85
RUBY VERSION
ruby 3.4.2p28
ruby 3.4.3p32
BUNDLED WITH
2.6.1

View File

@ -6,10 +6,13 @@ require 'csv'
class GuestsController < ApplicationController
GUEST_PARAMS = { only: %i[id name status], include: { group: { only: %i[id name] } } }.freeze
skip_before_action :authenticate_user!, only: :update
def index
render json: Guest.includes(:group)
.left_joins(:group)
.order('groups.name' => :asc, name: :asc)
.order('groups.name' => :asc, invitation_id: :asc, name: :asc)
.as_json(GUEST_PARAMS)
end
@ -31,6 +34,6 @@ class GuestsController < ApplicationController
private
def guest_params
params.expect(guest: %i[name group_id status])
user_signed_in? ? params.expect(guest: %i[name group_id status]) : params.expect(guest: %i[status])
end
end

View File

@ -2,9 +2,9 @@
# frozen_string_literal: true
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
class InvitationsController < ApplicationController
skip_before_action :authenticate_user!, only: :show
def index
render json: Invitation.includes(:guests).as_json(
only: :id,
@ -16,6 +16,16 @@ class InvitationsController < ApplicationController
)
end
def show
invitation = Invitation.includes(:guests).find(params[:id])
if invitation
render json: invitation, only: :id, include: { guests: { only: %i[id name status] } }, status: :ok
else
render json: { error: 'Invitation not found' }, status: :not_found
end
end
def create
invitation = Invitation.create

View File

@ -42,7 +42,7 @@ Rails.application.routes.draw do
resources :tables_arrangements, only: %i[index show create]
resources :summary, only: :index
resources :invitations, only: %i[index create update destroy]
resources :invitations, only: %i[show index create update destroy]
root to: redirect("/%{slug}")
end