From 2684f17a17e4f97bdb89d20b4cd08585235263a2 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 7 Jun 2011 14:27:57 -0700 Subject: Update asset helpers to use `config.assets.prefix` Fixes #1489 --- actionpack/lib/sprockets/helpers/rails_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/sprockets/helpers/rails_helper.rb') diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb index dcf4b9279e..0b6bd8ca40 100644 --- a/actionpack/lib/sprockets/helpers/rails_helper.rb +++ b/actionpack/lib/sprockets/helpers/rails_helper.rb @@ -67,13 +67,13 @@ module Sprockets 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) -- cgit v1.2.3