Skip to content

Commit 8f87aa6

Browse files
authored
chore: adjust autoload path for Rails 8 (#1017)
## Summary - avoid modifying frozen autoload paths by registering engine lib via `paths.add` ## Testing - `bin/ci` *(fails: Could not find font-awesome-sass-6.7.2, sassc-2.4.0 in locally installed gems)* - `bundle exec rubocop` *(fails: Could not find font-awesome-sass-6.7.2, sassc-2.4.0 in locally installed gems)* - `bundle exec brakeman -q -w2` *(fails: Could not find font-awesome-sass-6.7.2, sassc-2.4.0 in locally installed gems)* - `bundle exec bundler-audit --update` *(fails: Could not find font-awesome-sass-6.7.2, sassc-2.4.0 in locally installed gems)* - `bin/codex_style_guard` *(fails: Could not find font-awesome-sass-6.7.2, sassc-2.4.0 in locally installed gems)* ------ https://chatgpt.com/codex/tasks/task_e_689b742c7474832197c577e8473f6bf1
2 parents cd9fea0 + dde5f6a commit 8f87aa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/better_together/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Engine < ::Rails::Engine
4444
isolate_namespace BetterTogether
4545

4646
# Avoid modifying frozen autoload path arrays (Rails 8 compatibility)
47-
config.autoload_paths = Array(config.autoload_paths) + Dir["#{root}/lib/better_together/**/"]
47+
paths.add 'lib', eager_load: true
4848

4949
config.generators do |g|
5050
g.orm :active_record, primary_key_type: :uuid

0 commit comments

Comments
 (0)