feat: replace Member.all with TomSelect for meeting organisers#2567
Merged
till merged 1 commit intocodebar:masterfrom Apr 16, 2026
Merged
Conversation
- Add organisers field to TomSelect initialization with remove_button plugin - Pre-populate existing organisers on edit form using options_for_select - Add remove_from_tom_select test helper for multi-select interaction - Update tests for TomSelect interaction (add/remove organisers) - Exclude meeting_organisers from Chosen.js initialization Reuses /admin/members/search endpoint from PR codebar#2562. Fixes performance issue loading 28k+ members on every page load.
f3228ae to
a2c4c9c
Compare
till
approved these changes
Apr 16, 2026
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.
Summary
Member.alldropdown with TomSelect for remote member search in meeting organiser fieldcreateaction bug where organisers were assigned before meeting was savedremove_buttonplugin for multi-select item removalChanges
app/controllers/admin/meetings_controller.rbset_organisersaftersaveapp/views/admin/meetings/_form.html.hamlf.selectwithoptions_for_selectapp/assets/javascripts/application.jsremove_buttonpluginspec/support/select_from_tom_select.rbremove_from_tom_selecthelperspec/features/admin/meeting_spec.rbBug Fix
The
createaction was callingset_organisersbefore@meeting.save, so@meeting.idwasnil. Roleify'sadd_role(:organiser, @meeting)couldn't create permissions without a validresource_id. Fixed by moving organisers assignment after successful save (matches workshop controller pattern).Testing
bundle exec rspec spec/features/admin/meeting_spec.rbAll 9 tests pass.
Related
/admin/members/searchendpointTechnical Debt
Three TomSelect configs now exist (
member_lookup,meeting_invitations,meeting_organisers) with identical options. Consider extracting to a reusable function in a future refactor.