instance method
font_path
Ruby on Rails 4.1.16
Since v4.0.13Signature
font_path(source, options = {})
Computes the path to a font asset. Full paths from the document root will be passed through.
font_path("font") # => /assets/font font_path("font.ttf") # => /assets/font.ttf font_path("dir/font.ttf") # => /assets/dir/font.ttf font_path("/dir/font.ttf") # => /dir/font.ttf font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf
Parameters
-
sourcereq -
optionsopt = {}
Source
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 342
def font_path(source, options = {})
path_to_asset(source, {type: :font}.merge!(options))
end
Defined in actionview/lib/action_view/helpers/asset_url_helper.rb line 342
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::AssetUrlHelper