Sha256: a062ae4423cf9ba98cd5fcc10b11af30e86e0f0bfd305a8686951b233bb318a7

Contents?: true

Size: 723 Bytes

Versions: 12

Compression:

Stored size: 723 Bytes

Contents

module Killbill
  module Plugin
    module ActiveMerchant
      module Sinatra
        enable :sessions

        include ::ActionView::Helpers::FormTagHelper

        helpers do
          def config
            ::Killbill::Plugin::ActiveMerchant.config
          end

          def logger
            ::Killbill::Plugin::ActiveMerchant.logger
          end

          def required_parameter!(parameter_name, parameter_value, message='must be specified!')
            halt 400, "#{parameter_name} #{message}" if parameter_value.blank?
          end
        end

        after do
          # return DB connections to the Pool if required
          ::ActiveRecord::Base.connection.close
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
killbill-3.1.11 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.10 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.9 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.8 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.7 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.6 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.5 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.4 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.3 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.2 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.1 lib/killbill/helpers/active_merchant/sinatra.rb
killbill-3.1.0 lib/killbill/helpers/active_merchant/sinatra.rb