diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index 4321cb1ed9..9e38b4a714 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -18,7 +18,7 @@ module ActionView
# image_tag("rails.png")
# =>
# stylesheet_include_tag("application")
- # =>
+ # =>
#
# 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
@@ -29,7 +29,7 @@ module ActionView
# image_tag("rails.png")
# =>
# stylesheet_include_tag("application")
- # =>
+ # =>
#
# To do this, you can either setup four actual hosts, or you can use wildcard DNS to CNAME
# the wildcard to a single asset host. You can read more about setting up your DNS CNAME records from
@@ -232,30 +232,30 @@ module ActionView
#
# ==== Examples
# stylesheet_link_tag "style" # =>
- #
+ #
#
# stylesheet_link_tag "style.css" # =>
- #
+ #
#
# stylesheet_link_tag "http://www.railsapplication.com/style.css" # =>
- #
+ #
#
# stylesheet_link_tag "style", :media => "all" # =>
- #
+ #
#
# stylesheet_link_tag "style", :media => "print" # =>
- #
+ #
#
# stylesheet_link_tag "random.styles", "/css/stylish" # =>
- #
- #
+ #
+ #
#
# You can also include all styles in the stylesheet directory using :all as the source:
#
# stylesheet_link_tag :all # =>
- #
- #
- #
+ #
+ #
+ #
#
# == Caching multiple stylesheets into one
#
@@ -266,20 +266,20 @@ module ActionView
#
# ==== Examples
# stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false =>
- #
- #
- #
+ #
+ #
+ #
#
# stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true =>
- #
+ #
#
# stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is false =>
- #
- #
- #
+ #
+ #
+ #
#
# stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is true =>
- #
+ #
def stylesheet_link_tag(*sources)
options = sources.extract_options!.stringify_keys
cache = options.delete("cache")
@@ -299,7 +299,7 @@ module ActionView
end
tag("link", {
- "rel" => "Stylesheet", "type" => Mime::CSS, "media" => "screen",
+ "rel" => "stylesheet", "type" => Mime::CSS, "media" => "screen",
"href" => stylesheet_path(joined_stylesheet_name)
}.merge(options))
else
@@ -307,7 +307,7 @@ module ActionView
expand_stylesheet_sources(sources).collect do |source|
tag("link", {
- "rel" => "Stylesheet", "type" => Mime::CSS, "media" => "screen", "href" => stylesheet_path(source)
+ "rel" => "stylesheet", "type" => Mime::CSS, "media" => "screen", "href" => stylesheet_path(source)
}.merge(options))
end.join("\n")
end
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 09bae17aa4..7708154048 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -86,15 +86,15 @@ class AssetTagHelperTest < Test::Unit::TestCase
}
StyleLinkToTag = {
- %(stylesheet_link_tag("style")) => %(),
- %(stylesheet_link_tag("style.css")) => %(),
- %(stylesheet_link_tag("/dir/file")) => %(),
- %(stylesheet_link_tag("dir/file")) => %(),
- %(stylesheet_link_tag("style", :media => "all")) => %(),
- %(stylesheet_link_tag(:all)) => %(\n),
- %(stylesheet_link_tag(:all, :media => "all")) => %(\n),
- %(stylesheet_link_tag("random.styles", "/css/stylish")) => %(\n),
- %(stylesheet_link_tag("http://www.example.com/styles/style")) => %()
+ %(stylesheet_link_tag("style")) => %(),
+ %(stylesheet_link_tag("style.css")) => %(),
+ %(stylesheet_link_tag("/dir/file")) => %(),
+ %(stylesheet_link_tag("dir/file")) => %(),
+ %(stylesheet_link_tag("style", :media => "all")) => %(),
+ %(stylesheet_link_tag(:all)) => %(\n),
+ %(stylesheet_link_tag(:all, :media => "all")) => %(\n),
+ %(stylesheet_link_tag("random.styles", "/css/stylish")) => %(\n),
+ %(stylesheet_link_tag("http://www.example.com/styles/style")) => %()
}
ImagePathToTag = {
@@ -248,14 +248,14 @@ class AssetTagHelperTest < Test::Unit::TestCase
ActionController::Base.perform_caching = true
assert_dom_equal(
- %(),
+ %(),
stylesheet_link_tag(:all, :cache => true)
)
assert File.exists?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css'))
assert_dom_equal(
- %(),
+ %(),
stylesheet_link_tag(:all, :cache => "money")
)
@@ -270,14 +270,14 @@ class AssetTagHelperTest < Test::Unit::TestCase
ActionController::Base.perform_caching = false
assert_dom_equal(
- %(\n),
+ %(\n),
stylesheet_link_tag(:all, :cache => true)
)
assert !File.exists?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css'))
assert_dom_equal(
- %(\n),
+ %(\n),
stylesheet_link_tag(:all, :cache => "money")
)
@@ -337,7 +337,7 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
def test_should_ignore_asset_host_on_complete_url
ActionController::Base.asset_host = "http://assets.example.com"
- assert_dom_equal(%(), stylesheet_link_tag("http://bar.example.com/stylesheets/style.css"))
+ assert_dom_equal(%(), stylesheet_link_tag("http://bar.example.com/stylesheets/style.css"))
ensure
ActionController::Base.asset_host = ""
end