rosa-build/lib/modules/models/url_helper.rb

9 lines
360 B
Ruby

# -*- encoding : utf-8 -*-
module Modules::Models::UrlHelper
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'
{:host => host, :protocol => protocol}
end
end