Open
Description
This works:
gem "actionview", "6.0.3.2"
gem "rails-html-sanitizer", "1.4.3"
require "action_view"
require "rails-html-sanitizer"
include ActionView::Helpers::SanitizeHelper
puts sanitize "hello"
This doesn't:
gem "actionview", "6.0.3.2"
gem "rails-html-sanitizer", "1.4.3"
require "rails-html-sanitizer"
require "action_view"
include ActionView::Helpers::SanitizeHelper
puts sanitize "hello"
In a real world app, sidekiq loads the files in the correct order but when using sidekiqswarm it doesn't.
Although, I don't see anything special with sidekiqswarm other than its forking machinery there.
Is this something we can fix here?
The current workaround is to require the action view in a initializer to make sure it loaded:
$ cat config/initializers/00_action_view.rb
require 'action_view/helpers/sanitize_helper'
The problem is that this gem is defining the module here: https://github.com/rails/rails-html-sanitizer/blob/master/lib/rails-html-sanitizer.rb#L30-L32
And possible we are using autoloading inside rails which doesn't require the file.
Metadata
Metadata
Assignees
Labels
No labels
Activity