2014-03-11 08:58:36 +00:00
|
|
|
module UrlHelper
|
2013-05-16 19:50:18 +01:00
|
|
|
def default_url_options
|
|
|
|
host ||= EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host]
|
|
|
|
protocol ||= APP_CONFIG['mailer_https_url'] ? 'https' : 'http' rescue 'http'
|
2014-03-11 08:58:36 +00:00
|
|
|
{ host: host, protocol: protocol }
|
2013-05-16 19:50:18 +01:00
|
|
|
end
|
|
|
|
end
|