diff options
author | Xavier Noria <fxn@hashref.com> | 2009-01-17 03:12:54 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-01-17 03:12:54 +0100 |
commit | bb0db1a7cb494251143d50a922a0ec3b20108768 (patch) | |
tree | 443f94c908abfb8a8353343c11d8958309f75fa9 /actionpack | |
parent | ea21b23b92fec1eb5fcc180f8bc054151216538b (diff) | |
download | rails-bb0db1a7cb494251143d50a922a0ec3b20108768.tar.gz rails-bb0db1a7cb494251143d50a922a0ec3b20108768.tar.bz2 rails-bb0db1a7cb494251143d50a922a0ec3b20108768.zip |
reworded docs of AssetTagHelper, Mike helped here
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 7e1110afab..b79fb454d0 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -9,22 +9,28 @@ module ActionView # the assets exist before linking to them. # # === Using asset hosts + # # By default, Rails links to these assets on the current host in the public - # folder, but you can direct Rails to link to assets from a dedicated assets server by - # setting ActionController::Base.asset_host in your <tt>config/environment.rb</tt>. For example, - # let's say your asset host is <tt>assets.example.com</tt>. + # folder, but you can direct Rails to link to assets from a dedicated asset server by + # setting ActionController::Base.asset_host in your <tt>config/environment.rb</tt>. + # For example, you'd define <tt>assets.example.com</tt> to be your asset + # host this way: # # ActionController::Base.asset_host = "assets.example.com" + # + # Helpers take that into account: + # # image_tag("rails.png") # => <img src="http://assets.example.com/images/rails.png" alt="Rails" /> # stylesheet_link_tag("application") # => <link href="http://assets.example.com/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" /> # - # This is useful since browsers typically open at most two connections to a single host, - # which means your assets often wait in single file for their turn to load. You can - # alleviate this by using a <tt>%d</tt> wildcard in <tt>asset_host</tt> (for example, "assets%d.example.com") - # to automatically distribute asset requests among four hosts (e.g., "assets0.example.com" through "assets3.example.com") - # so browsers will open eight connections rather than two. + # Browsers typically open at most two simultaneous connections to a single host, + # which means your assets often have to wait for other assets to finish downloading. + # You can alleviate this by using a <tt>%d</tt> wildcard in <tt>asset_host</tt> + # (for example, "assets%d.example.com") to automatically distribute asset requests + # among four hosts (e.g., "assets0.example.com" through "assets3.example.com") so + # browsers will open eight simultaneous connections rather than two. # # image_tag("rails.png") # => <img src="http://assets0.example.com/images/rails.png" alt="Rails" /> |