Set host infos for urls in emails via app_config.

This commit is contained in:
benni 2012-12-28 13:55:18 +01:00
parent db07b28b1c
commit cd583cc9b2

View file

@ -93,6 +93,8 @@ class Mailer < ActionMailer::Base
private private
def set_foodcoop_scope(foodcoop = FoodsoftConfig.scope) def set_foodcoop_scope(foodcoop = FoodsoftConfig.scope)
ActionMailer::Base.default_url_options[:protocol] = FoodsoftConfig[:protocol]
ActionMailer::Base.default_url_options[:host] = FoodsoftConfig[:host]
ActionMailer::Base.default_url_options[:foodcoop] = foodcoop ActionMailer::Base.default_url_options[:foodcoop] = foodcoop
end end