You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading our project that uses our gem to Rails 6 in Zeitwerk mode (setting config.load_defaults to "6.0"), we found that running our test suite output this warning:
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.
In order to autoload safely at boot time, please wrap your code in a reloader
callback this way:
Rails.application.reloader.to_prepare do
# Autoload classes and modules needed at boot time here.
end
That block runs when the application boots, and every time there is a reload.
For historical reasons, it may run twice, so it has to be idempotent.
Check the "Autoloading and Reloading Constants" guide to learn more about how
Rails autoloads and reloads.
This is because line 24 of lib/rabl-rails/configuration.rb calls ActionController::Base without the suggested to_prepare block wrapping it.
Is this something that can be tweaked in a future release to silence the warning/avoid future errors?
The text was updated successfully, but these errors were encountered:
We use the same version and our working to update to Rails 7. We use rabl-rails pretty extensively. We have not encountered this warning with rabl-rails though. Is the warning still occurring for you?
We use the same version and our working to update to Rails 7. We use rabl-rails pretty extensively. We have not encountered this warning with rabl-rails though. Is the warning still occurring for you?
I am not seeing it currently, but I'm not sure if that's because the error was addressed or because we changed our code to get around this somehow.
Hello,
When upgrading our project that uses our gem to Rails 6 in Zeitwerk mode (setting
config.load_defaults
to "6.0"), we found that running our test suite output this warning:This is because line 24 of
lib/rabl-rails/configuration.rb
callsActionController::Base
without the suggestedto_prepare
block wrapping it.Is this something that can be tweaked in a future release to silence the warning/avoid future errors?
The text was updated successfully, but these errors were encountered: