refactor: rename InvitationController to WorkshopInvitationController#2530
Merged
olleolleolle merged 1 commit intocodebar:masterfrom Mar 18, 2026
Merged
Conversation
- Inline InvitationControllerConcerns into the controller - Rename controller to WorkshopInvitationController for clarity - Add dual routes for backwards compatibility (/invitation and /workshop_invitation) - Rename views from app/views/invitation to app/views/workshop_invitation - Add .worktrees/ to .gitignore
fd52057 to
5b692c8
Compare
olleolleolle
approved these changes
Mar 18, 2026
Collaborator
olleolleolle
left a comment
There was a problem hiding this comment.
Thank you for the excellent context in the PR, merging!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The original
InvitationControllerandInvitationControllerConcernshad several issues:Naming confusion: The controller was named
InvitationControllerbut actually handles only workshop invitations (WorkshopInvitationmodel), not event invitations (Invitationmodel). There was also an admin controller with the same name handling event invitations, causing confusion.Over-extracted concerns:
InvitationControllerConcernswas only used in one place (the controller itself), violating the "3 uses before extracting" guideline. The methods have been inlined directly into the controller.No documentation: The controller had no comment explaining its purpose or that it handles workshop invitations specifically.
Analysis
InvitationController- inlined into the controllerWaitingListsController- kept as a shared concernSummary
InvitationControllerConcernsinto the controller (deleted unused concern file)InvitationControllertoWorkshopInvitationControllerfor clarity/invitation/:tokenand/workshop_invitation/:token)app/views/invitation/toapp/views/workshop_invitation/.worktrees/to.gitignoreExisting invitation links in emails continue to work via the legacy route.