Class: SpreeWholesale::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- SpreeWholesale::Engine
- Defined in:
- lib/spree_wholesale.rb
Class Method Summary collapse
Class Method Details
._load(c) ⇒ Object
19 20 21 |
# File 'lib/spree_wholesale.rb', line 19 def self._load(c) Rails.env.production? ? require(c) : load(c) end |
.activate ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/spree_wholesale.rb', line 23 def self.activate if 40 <= Spree.version.split(".")[1].to_i _load File.("../spree_wholesale/wholesaler_ability.rb", __FILE__) end Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator.rb")) do |c| _load(c) end end |