Sha256: f64f4f3883a7161ae8c63559c9e9b508cc8507f65667af49da89bb1f72d94107

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

require "tb_core"
require "activemerchant"
require "active_merchant/billing/rails"
require "tb_checkout/configuration"
require 'tb_checkout/schema'

module TbCheckout
  class Engine < ::Rails::Engine
    include TbCheckout::Schema

    initializer 'tb_checkout.cart_helpers' do |config|
      ActiveSupport.on_load :spud_application_controller do
        Spud::ApplicationController.send :include, TbCheckout::ControllerHelpers
      end
    end

    initializer 'tb_checkout.admin', :before => 'tb_core.admin' do |config|
      Spud::Core.admin_applications += [{
        :name => 'Shopping Carts',
        :url => '/admin/carts',
        :thumbnail => 'tb_checkout/admin/shopping_carts.png'
      },{
        :name => 'Transactions',
        :url => '/admin/transactions',
        :thumbnail => 'tb_checkout/admin/transactions.png'
      }]
    end

    config.generators do |g|
      g.test_framework :rspec, :fixture => false
      g.fixture_replacement :factory_girl, :dir => 'spec/factories'
      g.assets false
      g.helper true
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_checkout-1.1.1 lib/tb_checkout/engine.rb
tb_checkout-1.1.0 lib/tb_checkout/engine.rb
tb_checkout-1.0.7 lib/tb_checkout/engine.rb