aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/asset_tag_helper.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-01-08 04:09:24 +0000
committerRick Olson <technoweenie@gmail.com>2007-01-08 04:09:24 +0000
commit10d0fcd4ecdb6c9fc48d95c4ccac1cc7455aa707 (patch)
treefa14d435aa902a85675c6253ad2f83f91143bdc2 /actionpack/lib/action_view/helpers/asset_tag_helper.rb
parent0eabcfd85656908b8c13f4704cb60004a1ebe981 (diff)
downloadrails-10d0fcd4ecdb6c9fc48d95c4ccac1cc7455aa707.tar.gz
rails-10d0fcd4ecdb6c9fc48d95c4ccac1cc7455aa707.tar.bz2
rails-10d0fcd4ecdb6c9fc48d95c4ccac1cc7455aa707.zip
Lookup the mime type for #auto_discovery_link_tag in the Mime::Type class. Closes #6941 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/asset_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index 29d77f479d..fedbf262a1 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -38,7 +38,7 @@ module ActionView
tag(
"link",
"rel" => tag_options[:rel] || "alternate",
- "type" => tag_options[:type] || "application/#{type}+xml",
+ "type" => tag_options[:type] || Mime::Type.lookup_by_extension(type.to_s).to_s,
"title" => tag_options[:title] || type.to_s.upcase,
"href" => url_options.is_a?(Hash) ? url_for(url_options.merge(:only_path => false)) : url_options
)