Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Hooks should be loaded in activate to avoid repeated applicat…

…ion."

This reverts commit e1ae1f1.
  • Loading branch information...
commit 792db16dfac01d72651ae70ee5ccf9af40626c06 1 parent eaa0155
@romul romul authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 promotions/lib/spree_promotions.rb
View
4 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
+end
Please sign in to comment.
Something went wrong with that request. Please try again.