lib/blocks/helpers/controller_extensions.rb in blocks-4.0.0 vs lib/blocks/helpers/controller_extensions.rb in blocks-4.0.1

- old
+ new

@@ -1,13 +1,15 @@ # frozen_string_literal: true -require 'action_controller' +require 'active_support/dependencies' module Blocks module ControllerExtensions def blocks @blocks ||= Blocks.builder_class.new(view_context) end end end -ActionController::Base.send :include, Blocks::ControllerExtensions +ActiveSupport.on_load(:action_controller) do + include Blocks::ControllerExtensions +end