Class: UrlHelper
- Inherits:
-
Object
- Object
- UrlHelper
- Includes:
- RouteUrlHelpers, Singleton
- Defined in:
- app/models/url_helper.rb
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.
Constant Summary
Constants included from RouteUrlHelpers
Class Method Summary collapse
-
.default_url_options(options = {}) ⇒ Hash
{ protocol: 'https' }merged with options.
Class Method Details
.default_url_options(options = {}) ⇒ Hash
Returns { protocol: 'https' } merged with options.
15 16 17 |
# File 'app/models/url_helper.rb', line 15 def self.( = {}) { protocol: 'https' }.merge() end |