Class: UrlHelper

Inherits:
Object
  • Object
show all
Includes:
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.

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.default_url_options(options = {})
  { protocol: 'https' }.merge(options)
end