Sha256: 73d2d4e3ce4169ca07905f311ad703b8740253a29dc53adb00412c30d94350de

Contents?: true

Size: 818 Bytes

Versions: 15

Compression:

Stored size: 818 Bytes

Contents

# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'

class CalculatorsExtension < Spree::Extension
  version "1.0"
  description "Extension for calculators"
  url "http://spreecomerce.com"

  # Please use calculators/config/routes.rb instead for extension routes.

  # def self.require_gems(config)
  #   config.gem "gemname-goes-here", :version => '1.2.3'
  # end
  
  def activate 
    [
      Calculator::FlatPercentItemTotal,
      Calculator::FlatRate,
      Calculator::FlexiRate,
      Calculator::PerItem,
      Calculator::SalesTax,
      Calculator::Vat,
    ].each{|c_model|
      begin
        c_model.register if c_model.table_exists?
      rescue Exception => e
        $stderr.puts "Error registering calculator #{c_model}"
      end
    }
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
spree-0.11.4 vendor/extensions/calculators/calculators_extension.rb
spree-0.11.3 vendor/extensions/calculators/calculators_extension.rb
spree-0.11.2 vendor/extensions/calculators/calculators_extension.rb
spree-0.11.1 vendor/extensions/calculators/calculators_extension.rb
spree-0.11.0 vendor/extensions/calculators/calculators_extension.rb
spree-0.10.2 vendor/extensions/calculators/calculators_extension.rb
spree-0.10.1 vendor/extensions/calculators/calculators_extension.rb
spree-0.10.0 vendor/extensions/calculators/calculators_extension.rb
spree-0.10.0.beta vendor/extensions/calculators/calculators_extension.rb
spree-enriquez-0.9.4 vendor/extensions/calculators/calculators_extension.rb
spree-0.9.4 vendor/extensions/calculators/calculators_extension.rb
spree-0.9.3 vendor/extensions/calculators/calculators_extension.rb
spree-0.9.2 vendor/extensions/calculators/calculators_extension.rb
spree-0.9.1 vendor/extensions/calculators/calculators_extension.rb
spree-0.9.0 vendor/extensions/calculators/calculators_extension.rb