提交 2684f17a 编写于 作者: J Joshua Peek

Update asset helpers to use `config.assets.prefix`

Fixes #1489
上级 c00da252
......@@ -67,13 +67,13 @@ def debug_assets?
def asset_path(source, default_ext = nil, body = false)
source = source.logical_path if source.respond_to?(:logical_path)
path = asset_paths.compute_public_path(source, 'assets', default_ext, true)
path = asset_paths.compute_public_path(source, Rails.application.config.assets.prefix, default_ext, true)
body ? "#{path}?body=1" : path
end
class AssetPaths < ActionView::Helpers::AssetPaths #:nodoc:
def compute_public_path(source, dir, ext=nil, include_host=true)
super(source, 'assets', ext, include_host)
super(source, Rails.application.config.assets.prefix, ext, include_host)
end
def asset_for(source, ext)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册