aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets/helpers/rails_helper.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-06-07 14:27:57 -0700
committerJoshua Peek <josh@joshpeek.com>2011-06-07 14:27:57 -0700
commit2684f17a17e4f97bdb89d20b4cd08585235263a2 (patch)
treea3d3ce74a2fef407ee517ddcd51f40216fbb0592 /actionpack/lib/sprockets/helpers/rails_helper.rb
parentc00da252b8b687b44a6d53d35218277c99b39da8 (diff)
downloadrails-2684f17a17e4f97bdb89d20b4cd08585235263a2.tar.gz
rails-2684f17a17e4f97bdb89d20b4cd08585235263a2.tar.bz2
rails-2684f17a17e4f97bdb89d20b4cd08585235263a2.zip
Update asset helpers to use `config.assets.prefix`
Fixes #1489
Diffstat (limited to 'actionpack/lib/sprockets/helpers/rails_helper.rb')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb4
1 files changed, 2 insertions, 2 deletions
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)