Class: MpayGateway

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/mpay_gateway.rb

Class Method Summary collapse

Class Method Details

.activateObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/mpay_gateway.rb', line 7

def self.activate
  
  Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
    Rails.env.production? ? require(c) : load(c)
  end
  
  # load billing stuff
  BillingIntegration::Mpay.register
 
  # integrate our god-frickin' view helper
  Spree::BaseController.class_eval do
    helper MpayHelper
  end
end