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

8 lines
327 B
Ruby
Raw Normal View History

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'
2014-01-21 04:51:49 +00:00
{host: host, protocol: protocol}
end
end