Class: Spree::Promo::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/spree/promo/engine.rb

Class Method Summary collapse

Class Method Details

.activateObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/spree/promo/engine.rb', line 7

def self.activate
  Dir.glob(File.join(File.dirname(__FILE__), '../../../app/**/*_decorator*.rb')) do |c|
    Rails.configuration.cache_classes ? require(c) : load(c)
  end

  Spree::StoreController.class_eval do
    # Include list of visited paths in notification payload hash
    def default_notification_payload
      { :user => try_spree_current_user, :order => current_order, :visited_paths => session[:visited_paths] }
    end
  end
end