Skip to content

Commit

Permalink
Update asset helpers to use config.assets.prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Jun 7, 2011
1 parent c00da25 commit 2684f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/sprockets/helpers/rails_helper.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 2684f17

Please sign in to comment.