Do not autoload ActionText::ContentHelper helper on boot#54914
Merged
rafaelfranca merged 1 commit intorails:mainfrom Oct 21, 2025
Merged
Do not autoload ActionText::ContentHelper helper on boot#54914rafaelfranca merged 1 commit intorails:mainfrom
rafaelfranca merged 1 commit intorails:mainfrom
Conversation
057be0e to
b48e01a
Compare
chaadow
commented
Oct 19, 2025
| config.after_initialize do |app| | ||
| if klass = app.config.action_text.sanitizer_vendor | ||
| ActionText::ContentHelper.sanitizer = klass.safe_list_sanitizer.new | ||
| ActiveSupport.on_load(:action_view_base) do |
Contributor
Author
There was a problem hiding this comment.
i've opted for this hook because the ContentHelper is defined inside app/helpers as part of the engine.
Member
|
This PR broke the CI |
b48e01a to
911ed08
Compare
911ed08 to
708eba4
Compare
708eba4 to
fcc32ce
Compare
fcc32ce to
43c4495
Compare
rafaelfranca
added a commit
that referenced
this pull request
Oct 21, 2025
Do not autoload ActionText::ContentHelper helper on boot
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 / Background
After watching @bensheldon 's talk
An ok compromise. Faster development by designing for the Rails AutoloaderI got motivated to try and run the script mentionned in the video on my production rails app (which runs on edge rails ).Ben mentions that
ActionText::ContentHelperis autoloaded at this timestampI've managed to replicate it on my own application.
Along with this script ( which I've edited a bit to display more messages and add it to our CI ):
Detail
ActionView::Baseapp/helpersfrom the autoload once pathsAdditional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]