method
asset_path
v3.1.0 -
Show latest stable
- Class:
Sprockets::Helpers::RailsHelper
asset_path(source, default_ext = nil, body = false, protocol = nil)public
No documentation available.
# File actionpack/lib/sprockets/helpers/rails_helper.rb, line 67
def asset_path(source, default_ext = nil, body = false, protocol = nil)
source = source.logical_path if source.respond_to?(:logical_path)
path = asset_paths.compute_public_path(source, 'assets', default_ext, true, protocol)
body ? "#{path}?body=1" : path
end