aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index b27a5a5c1e..fb017b7e7b 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added the option of specifying a RAILS_ASSET_HOST that will then be used by all the asset helpers. This enables you to easily offload static content like javascripts and images to a separate server tuned just for that.
+
* Fixed action/fragment caching using the filestore when a directory and a file wanted to to use the same name. Now there's a .cache prefix that sidesteps the conflict #1188 [imbcmdth@hotmail.com]
* Fixed missing id uniqueness in FormTag#radio_button #1207 [Jarkko]
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index f888e7a3e2..a1c22747ae 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -104,8 +104,8 @@ module ActionView
def compute_public_path(source, dir, ext)
source = "/#{dir}/#{source}" unless source.include?("/")
source = "#{source}.#{ext}" unless source.include?(".")
- source = "#{@request.relative_url_root}#{source}"
- source
+ source = "#{@request.relative_url_root}#{source}"
+ defined?(RAILS_ASSET_HOST) ? RAILS_ASSET_HOST + source : source
end
end
end