Skip to content

Commit

Permalink
Merge pull request #474 from thanosbellos/master
Browse files Browse the repository at this point in the history
Use Rails.autoloaders.zeitwerk_enabled? to check whether zeitwerk is rails autoloader
  • Loading branch information
michaelklishin authored Mar 6, 2023
2 parents 803d60d + 4f64fd6 commit 2182270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sneakers/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Rake::Task['environment'].invoke

if defined?(::Rails)
if Rails.application.config.autoloader == :zeitwerk
if Rails.autoloaders.zeitwerk_enabled?
::Zeitwerk::Loader.eager_load_all
else
::Rails.application.eager_load!
Expand Down

0 comments on commit 2182270

Please sign in to comment.