Class: SpreeUserGroups::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- SpreeUserGroups::Engine
- Defined in:
- lib/spree_user_groups.rb
Class Method Summary collapse
Class Method Details
.activate ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/spree_user_groups.rb', line 9 def self.activate Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| Rails.env.production? ? require(c) : load(c) end if File.basename( $0 ) != "rake" begin UserGroup.register_calculator(Calculator::AdvancedFlatPercent) rescue Exception => e $stderr.puts "Error registering promotion calculator #{Calculator::AdvancedFlatPercent}" end end end |