module ActionView::Helpers::AssetUrlHelper
def font_url(source, options = {})
font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf
options is set, it overwrites global +config.action_controller.asset_host+ setting.
Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
This will use +font_path+ internally, so most of their behaviors will be the same.
Computes the full URL to a font asset.
def font_url(source, options = {}) url_to_asset(source, { type: :font }.merge!(options)) end