refactor: remove dead full_url_for helper and all call sites - #2769
Merged
Conversation
mroderick
force-pushed
the
fix/remove-full-url-for
branch
from
July 31, 2026 09:58
b96d944 to
f466a4f
Compare
mroderick
marked this pull request as ready for review
July 31, 2026 09:59
mroderick
force-pushed
the
fix/remove-full-url-for
branch
from
July 31, 2026 10:06
f466a4f to
d6736e3
Compare
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
full_url_forwas dead code. The method concatenated#{@host}#{path}, but@hostwas never set in any mailer. All callers already passed*_urlhelpers (invitation_url,event_invitation_url,unsubscribe_url, etc.) which return fully-qualified URLs viaconfig.action_mailer.default_url_options.History
full_url_forwas introduced in October 2013 (6fb19ab5) alongside the first invitation emails, with the apparent intent to prepend a host to relative paths. However,@hostwas never assigned in any mailer method across the entire project history — it has been dead code from day one.Rails'
*_urlhelpers (e.g.,invitation_url,unsubscribe_url) have always been the actual mechanism for generating URLs in emails, and they produce fully-qualified URLs becauseconfig.action_mailer.default_url_optionsis configured in all environments (localhost:3000in dev/test,codebar.ioin production).Changes
app/helpers/email_helper.rb— the module is now emptyinclude EmailHelper/helper EmailHelperfrom:VirtualWorkshopInvitationMailerWorkshopInvitationMailerContactMailerhelper doblocks definingfull_url_forfrom:FeedbackRequestMailerEventInvitationMailerMeetingInvitationMailerfull_url_for(...)with...in all 21 mailer view call sites across 14 template filesVerification
All 75 mailer specs pass. Controller, feature, and policy specs also verified.