Skip to content

Commit

Permalink
Replace manual cache checks w/ require_dependency
Browse files Browse the repository at this point in the history
That's the correct (Rails) way of requiring in production and loading
when needed by the cache settings.

Fixes #34
  • Loading branch information
elia committed Jan 7, 2020
1 parent 7f544b6 commit f6c7cc4
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 @@ -28,7 +28,7 @@ def activate
# and won't be loaded by default. We need them to be
# executed anyway to extend exisiting classes.
Dir.glob(base_path.join('**/*.rb')) do |decorator_path|
Rails.configuration.cache_classes ? require(decorator_path) : load(decorator_path)
require_dependency(decorator_path)
end
end
end
Expand Down

0 comments on commit f6c7cc4

Please sign in to comment.