From 0cdef3400b73e4973e91e24d1da5aa7e329fcb46 Mon Sep 17 00:00:00 2001 From: farisalamin Date: Wed, 9 Apr 2025 16:02:32 +0100 Subject: [PATCH] Fix autoloading for Rails 7.0 --- lib/report_generator/rails.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/report_generator/rails.rb b/lib/report_generator/rails.rb index a467d58..af1f3a8 100644 --- a/lib/report_generator/rails.rb +++ b/lib/report_generator/rails.rb @@ -13,6 +13,8 @@ class Engine < Rails::Engine # Based on https://github.com/rails/webpacker/blob/v3.6.0/lib/webpacker/railtie.rb#L57-L65 initializer 'report_generator.helper' do + require_relative '../../app/helpers/report_generator/helper' + ActiveSupport.on_load :action_controller do ActionController::Base.helper ReportGenerator::Helper end