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
This commit is contained in:
parent
0eabcfd856
commit
10d0fcd4ec
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Lookup the mime type for #auto_discovery_link_tag in the Mime::Type class. Closes #6941 [Josh Peek]
|
||||
|
||||
* Fix bug where nested resources ignore a parent singleton parent's path prefix. Closes #6940 [Dan Kubb]
|
||||
|
||||
* Fix no method error with error_messages_on. Closes #6935 [nik.wakelin Koz]
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -36,6 +36,7 @@ class AssetTagHelperTest < Test::Unit::TestCase
|
|||
%(auto_discovery_link_tag) => %(<link href="http://www.example.com" rel="alternate" title="RSS" type="application/rss+xml" />),
|
||||
%(auto_discovery_link_tag(:rss)) => %(<link href="http://www.example.com" rel="alternate" title="RSS" type="application/rss+xml" />),
|
||||
%(auto_discovery_link_tag(:atom)) => %(<link href="http://www.example.com" rel="alternate" title="ATOM" type="application/atom+xml" />),
|
||||
%(auto_discovery_link_tag(:xml)) => %(<link href="http://www.example.com" rel="alternate" title="XML" type="application/xml" />),
|
||||
%(auto_discovery_link_tag(:rss, :action => "feed")) => %(<link href="http://www.example.com" rel="alternate" title="RSS" type="application/rss+xml" />),
|
||||
%(auto_discovery_link_tag(:rss, "http://localhost/feed")) => %(<link href="http://localhost/feed" rel="alternate" title="RSS" type="application/rss+xml" />),
|
||||
%(auto_discovery_link_tag(:rss, {:action => "feed"}, {:title => "My RSS"})) => %(<link href="http://www.example.com" rel="alternate" title="My RSS" type="application/rss+xml" />),
|
||||
|
|
Loading…
Reference in New Issue