Skip to content

Commit

Permalink
fix(tests): fix check of autoloaders
Browse files Browse the repository at this point in the history
  • Loading branch information
chloelbn committed Nov 27, 2020
1 parent 4c6395b commit 04ce668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/algoliasearch/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module AlgoliaSearch
module Utilities
class << self
def get_model_classes
if defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
if Rails.application && defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
Zeitwerk::Loader.eager_load_all
elsif Rails.application
Rails.application.eager_load!
Expand Down

0 comments on commit 04ce668

Please sign in to comment.