flipflop icon indicating copy to clipboard operation
flipflop copied to clipboard

fix: rails 6 deprecation warnings with autoloader

Open trcarden opened this issue 5 years ago • 0 comments

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: https://github.com/rails/rails/issues/36546

trcarden avatar Mar 14 '20 15:03 trcarden