Class: SpreeDoordash::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- SpreeDoordash::Engine
- Defined in:
- lib/spree_doordash/engine.rb
Class Method Summary collapse
-
.activate ⇒ Object
Force-loads decorator files the same way spree_square's engine does — not needed until this extension actually has a decorator (M3+), kept here from the start so adding one later doesn't require remembering this step.
Class Method Details
.activate ⇒ Object
Force-loads decorator files the same way spree_square's engine does —
not needed until this extension actually has a decorator (M3+), kept
here from the start so adding one later doesn't require remembering
this step. See spree_square/lib/spree_square/engine.rb for the full
rationale (Zeitwerk lazy-autoloading never triggers a decorator file's
prepend line otherwise).
36 37 38 39 40 |
# File 'lib/spree_doordash/engine.rb', line 36 def self.activate Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c| Rails.application.config.cache_classes ? require(c) : load(c) end end |