Skip to content
This repository
tree: 98f77e0827
Fetching contributors…

Cannot retrieve contributors at this time

file 25 lines (20 sloc) 0.668 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
require "action_mailer"
require "rails"

module ActionMailer
  class Railtie < Rails::Railtie
    railtie_name :action_mailer

    initializer "action_mailer.url_for", :before => :load_environment_config do |app|
      ActionMailer::Base.send(:include, app.routes.url_helpers)
    end

    require "action_mailer/railties/log_subscriber"
    log_subscriber ActionMailer::Railties::LogSubscriber.new

    initializer "action_mailer.logger" do
      ActionMailer::Base.logger ||= Rails.logger
    end

    initializer "action_mailer.set_configs" do |app|
      app.config.action_mailer.each do |k,v|
        ActionMailer::Base.send "#{k}=", v
      end
    end
  end
end
Something went wrong with that request. Please try again.