diff --git a/actionpack/lib/abstract_controller/asset_paths.rb b/actionpack/lib/abstract_controller/asset_paths.rb index 9ca2fb7..928d139 100644 --- a/actionpack/lib/abstract_controller/asset_paths.rb +++ b/actionpack/lib/abstract_controller/asset_paths.rb @@ -3,7 +3,7 @@ module AbstractController extend ActiveSupport::Concern included do - config_accessor :asset_host, :asset_path, :assets_dir, :javascripts_dir, :stylesheets_dir + config_accessor :asset_host, :asset_base_path, :assets_dir, :javascripts_dir, :stylesheets_dir end end end \ No newline at end of file diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index b24733f..5bbc4b9 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -739,7 +739,7 @@ module ActionView source += ".#{ext}" if rewrite_extension?(source, dir, ext) source = "/#{dir}/#{source}" unless source[0] == ?/ - source = rewrite_asset_path(source, config.asset_path) + source = rewrite_asset_path(source, config.asset_base_path) has_request = controller.respond_to?(:request) if has_request && include_host && source !~ %r{^#{controller.config.relative_url_root}/} diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 0c891ae..2e3a6b1 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -395,14 +395,14 @@ class AssetTagHelperTest < ActionView::TestCase end def test_string_asset_id - @controller.config.asset_path = "/assets.v12345%s" + @controller.config.asset_base_path = "/assets.v12345%s" expected_path = "/assets.v12345/images/rails.png" assert_equal %(Rails), image_tag("rails.png") end def test_proc_asset_id - @controller.config.asset_path = Proc.new do |asset_path| + @controller.config.asset_base_path = Proc.new do |asset_path| "/assets.v12345#{asset_path}" end