Repository navigation
Fix uninitialized constant CustomDeviseMailer on new org user invite (Resolves #5745) - #5762
Merged
dorner merged 2 commits intoNov 16, 2026
Conversation
… a cold-loaded process (rubyforgood#5745) Bump devise_invitable 2.0.13 -> 2.0.14. 2.0.13's :action_mailer load hook resolved Devise.mailer while CustomDeviseMailer was still being autoloaded, so the first invite in a non-eager-loaded process failed. 2.0.14 (scambra/devise_invitable#929) contains only that fix. Adds a spec that boots a fresh non-eager-loaded process, since CI eager-loads and hides the failure. Resolves rubyforgood#5745
2 of 3 tasks
dorner
requested changes
Nov 13, 2026
dorner
left a comment
Collaborator
There was a problem hiding this comment.
The test is good to demonstrate the fix, but IMO it doesn't need to be added to the corpus, especially since this was fixed in a dependency bump. We can stick with the bump and leave the test out.
The dependency bump fixes the issue; the spec was only needed to demonstrate it.
Contributor
Author
|
@dorner Removed the spec, so this is just the devise_invitable bump now. Ready for another look. |
dorner
approved these changes
Nov 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.
Resolves #5745
Description
Bumps devise_invitable 2.0.13 → 2.0.14, as agreed in the issue.
2.0.13 resolves
Devise.mailerin anon_load(:action_mailer)hook. Without eager loading (e.g. development), that hook can fire whileCustomDeviseMaileris still loading, which raisesuninitialized constant CustomDeviseMailer. 2.0.14 contains only the upstream fix (scambra/devise_invitable#929).Type of change
How Has This Been Tested?
Added
spec/lib/custom_devise_mailer_load_spec.rb, which boots a fresh non-eager-loaded process, since CI eager-loads and hides the bug. It fails on 2.0.13 and passes on 2.0.14. Related mailer, invite and admin specs pass locally.