Skip to content

Commit

Permalink
Resolve Rails 6.0 deprecation warning:
Browse files Browse the repository at this point in the history
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.

`config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
  • Loading branch information
hunterae committed Mar 22, 2023
1 parent 679db7b commit 0176578
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ jobs:
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true

- name: Test Script
script: echo 'TESTING SECURITY';
script: 'bundle exec rake'

notifications:
Expand Down
6 changes: 4 additions & 2 deletions lib/blocks/helpers/controller_extensions.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'action_controller'
require 'active_support/dependencies'

module Blocks
module ControllerExtensions
Expand All @@ -10,4 +10,6 @@ def blocks
end
end

ActionController::Base.send :include, Blocks::ControllerExtensions
ActiveSupport.on_load(:action_controller) do
include Blocks::ControllerExtensions
end
2 changes: 1 addition & 1 deletion lib/blocks/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Blocks
VERSION = "4.0.0"
VERSION = "4.0.1"
end

0 comments on commit 0176578

Please sign in to comment.