Sha256: 972c9274c264ee18c48511de715dc38c948c28b271528b116c5ccdc98b12de37

Contents?: true

Size: 640 Bytes

Versions: 5

Compression:

Stored size: 640 Bytes

Contents

require 'postageapp'

if (defined?(ActionMailer))
  require 'postageapp/mailer'

  # Register as a delivery method with ActionMailer
  ActionMailer::Base.add_delivery_method(
    :postageapp,
    PostageApp::Mail::DeliveryMethod
  )
end

class PostageApp::Railtie < Rails::Railtie
  config.after_initialize do
    PostageApp.configure do |config|
      if (defined?(::Rails.version))
        config.framework = "Rails #{::Rails.version}"
      end

      if (defined?(::Rails.root))
        config.project_root = ::Rails.root
      end

      if (defined?(::Rails.env))
        config.environment  = ::Rails.env
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
postageapp-1.3.1 lib/postageapp/rails/railtie.rb
postageapp-1.3.0 lib/postageapp/rails/railtie.rb
postageapp-1.2.6 lib/postageapp/rails/railtie.rb
postageapp-1.2.5 lib/postageapp/rails/railtie.rb
postageapp-1.2.0 lib/postageapp/rails/railtie.rb