instance method
compute_asset_extname
Ruby on Rails 4.1.16
Since v4.0.13Signature
compute_asset_extname(source, options = {})
Compute extname to append to asset path. Returns nil if nothing should be added.
Parameters
-
sourcereq -
optionsopt = {}
Source
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 163
def compute_asset_extname(source, options = {})
return if options[:extname] == false
extname = options[:extname] || ASSET_EXTENSIONS[options[:type]]
extname if extname && File.extname(source) != extname
end
Defined in actionview/lib/action_view/helpers/asset_url_helper.rb line 163
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::AssetUrlHelper