diff --git a/promotions/lib/spree_promotions.rb b/promotions/lib/spree_promotions.rb index 5199de46c09..a449a7ef414 100644 --- a/promotions/lib/spree_promotions.rb +++ b/promotions/lib/spree_promotions.rb @@ -1,10 +1,10 @@ require 'spree_core' -require 'spree_promotions_hooks' module SpreePromotions class Engine < Rails::Engine def self.activate lambda{ + require 'spree_promotions_hooks' # put class_eval and other logic that depends on classes outside of the engine inside this block Product.class_eval do has_and_belongs_to_many :promotion_rules @@ -75,4 +75,4 @@ def eligible_automatic_promotions config.autoload_paths += %W(#{config.root}/lib) config.to_prepare &self.activate end -end \ No newline at end of file +end