Class: UrlHelper
Overview
Singleton that mixes in Rails route URL helpers so non-controller
code (mailers, jobs, models composing emails, etc.) can call
UrlHelper.instance.foo_url without instantiating a controller.
Defaults to https for absolute URLs.
Class Method Summary collapse
Class Method Details
.default_url_options(options = {}) ⇒ Object
10 11 12 |
# File 'app/models/url_helper.rb', line 10 def self.( = {}) { protocol: 'https' }.merge() end |