Skip to content

fix: rails 6 deprecation warnings with autoloader#33

Open
trcarden wants to merge 1 commit into
voormedia:masterfrom
mancrates:fix/rails_6_compat
Open

fix: rails 6 deprecation warnings with autoloader#33
trcarden wants to merge 1 commit into
voormedia:masterfrom
mancrates:fix/rails_6_compat

Conversation

@trcarden

Copy link
Copy Markdown

Rails 6 introduces a new autoloading framework that doesn't allow initializers to use the autoloading system.

DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ActionText::ContentHelper, for example,
the expected changes won't be reflected in that stale Module object.

These autoloaded constants have been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.

This patch simply follows suite with what other gems have done to maintain compatibility such as Sorcery: https://github.com/Sorcery/sorcery/pull/209/files

Master Rails here: rails/rails#36546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant