mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
install ActionController::UrlFor before environment is parsed, to provide ActionMailer#default_url_options=
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
committed by
Jeremy Kemper
parent
459ecaf95d
commit
363a752c36
@@ -5,6 +5,10 @@ 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, ActionController::UrlFor) if defined?(ActionController)
|
||||
end
|
||||
|
||||
require "action_mailer/railties/subscriber"
|
||||
subscriber ActionMailer::Railties::Subscriber.new
|
||||
|
||||
@@ -17,9 +21,5 @@ module ActionMailer
|
||||
ActionMailer::Base.send "#{k}=", v
|
||||
end
|
||||
end
|
||||
|
||||
initializer "action_mailer.url_for" do |app|
|
||||
ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user