aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-22 11:37:16 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-22 11:37:16 +0000
commit2a31691ee2c02af17471ffa0cdb267a8af633b50 (patch)
tree7b36c8e2ae396e610eefebf28e34d92ac256a314 /actionpack/lib
parent0b54f18c4753ecea5fd7db5f295b754d86412ddd (diff)
downloadrails-2a31691ee2c02af17471ffa0cdb267a8af633b50.tar.gz
rails-2a31691ee2c02af17471ffa0cdb267a8af633b50.tar.bz2
rails-2a31691ee2c02af17471ffa0cdb267a8af633b50.zip
Fixed that auto_discovery_link_tag couldn't take a string as the URL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index efde8fa51b..b5f630aae0 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -18,13 +18,13 @@ module ActionView
# <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.curenthost.com/controller/feed" />
# auto_discovery_link_tag(:rss, {:action => "feed"}, {:title => "My RSS"}) # =>
# <link rel="alternate" type="application/rss+xml" title="My RSS" href="http://www.curenthost.com/controller/feed" />
- def auto_discovery_link_tag(type = :rss, options = {}, tag_options = {})
+ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
tag(
"link",
- "rel" => tag_options[:rel] || "alternate",
- "type" => tag_options[:type] || "application/#{type}+xml",
+ "rel" => tag_options[:rel] || "alternate",
+ "type" => tag_options[:type] || "application/#{type}+xml",
"title" => tag_options[:title] || type.to_s.upcase,
- "href" => url_for(options.merge(:only_path => false))
+ "href" => url_options.is_a?(Hash) ? url_for(url_options.merge(:only_path => false)) : url_options
)
end