Skip to content

Commit

Permalink
Merge pull request #38 from softr8/fix/autoloaders
Browse files Browse the repository at this point in the history
Fixes isse when zeitwerk is not enabled
  • Loading branch information
aldesantis authored Jan 16, 2020
2 parents 523db53 + 8f05db6 commit 963abf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/solidus_support/engine_extensions/decorators.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module ClassMethods
def activate
base_path = root.join('app/decorators')

if Rails.respond_to?(:autoloaders)
if Rails.respond_to?(:autoloaders) && Rails.autoloaders.main
# Add decorators folder to the Rails autoloader. This
# allows Zeitwerk to resolve decorators paths correctly,
# when used.
Expand Down

0 comments on commit 963abf3

Please sign in to comment.