Sha256: 2acbdf044859cee5d43124cbdae9b16e933e457572cf0e4617a39aa89374b18d

Contents?: true

Size: 596 Bytes

Versions: 2

Compression:

Stored size: 596 Bytes

Contents

require 'mollie-api-ruby'

module SpreeMollieGateway
  class Engine < ::Rails::Engine
    isolate_namespace SpreeMollieGateway

    config.autoload_paths += %W(#{config.root}/lib)

    def self.activate
      Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
        Rails.configuration.cache_classes ? require(c) : load(c)
      end

      Rails.application.config.spree.payment_methods << Spree::Gateway::MollieGateway
      Spree::PermittedAttributes.source_attributes << :payment_method_name
    end

    config.to_prepare &method(:activate).to_proc
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_mollie_gateway-0.1.1 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-0.1.0 lib/spree_mollie_gateway/engine.rb