diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 11:50:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 11:50:41 +0000 |
commit | dfac1cea3d851000116a23ab14c2b1ae981f7a12 (patch) | |
tree | 91abe3727d19f4c13affe1a2e4bc4637b35d5fdf /actionpack/lib/action_view/helpers/asset_tag_helper.rb | |
parent | db41d2dd5c738ca44a07330cf02e9d817fedc34c (diff) | |
download | rails-dfac1cea3d851000116a23ab14c2b1ae981f7a12.tar.gz rails-dfac1cea3d851000116a23ab14c2b1ae981f7a12.tar.bz2 rails-dfac1cea3d851000116a23ab14c2b1ae981f7a12.zip |
Fixed that form helpers would treat string and symbol keys differently in html_options (and possibly create duplicate entries) #112 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@833 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.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 33914b2144..2f3bd71d5a 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -10,15 +10,15 @@ module ActionView # either be <tt>:rss</tt> (default) or <tt>:atom</tt> and the +options+ follow the url_for style of declaring a link target. # # Examples: - # auto_discovery_link_tag # => + # auto_discovery_link_tag # => # <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.curenthost.com/controller/action" /> - # auto_discovery_link_tag(:atom) # => + # auto_discovery_link_tag(:atom) # => # <link rel="alternate" type="application/atom+xml" title="ATOM" href="http://www.curenthost.com/controller/action" /> - # auto_discovery_link_tag(:rss, :action => "feed") # => + # auto_discovery_link_tag(:rss, :action => "feed") # => # <link rel="alternate" type="application/atom+xml" title="ATOM" href="http://www.curenthost.com/controller/feed" /> def auto_discovery_link_tag(type = :rss, options = {}) tag( - "link", "rel" => "alternate", "type" => "application/#{type}+xml", "title" => type.to_s.upcase, + "link", "rel" => "alternate", "type" => "application/#{type}+xml", "title" => type.to_s.upcase, "href" => url_for(options.merge(:only_path => false)) ) end @@ -38,7 +38,7 @@ module ActionView content_tag("script", "", "language" => "JavaScript", "type" => "text/javascript", "src" => source) }.join("\n") end - + # Returns a css link tag per source given as argument. Examples: # # stylesheet_link_tag "style" # => @@ -48,7 +48,7 @@ module ActionView # <link href="/stylesheets/random.styles" media="screen" rel="Stylesheet" type="text/css" /> # <link href="/css/stylish.css" media="screen" rel="Stylesheet" type="text/css" /> def stylesheet_link_tag(*sources) - sources.collect { |source| + sources.collect { |source| source = "/stylesheets/#{source}" unless source.include?("/") source = "#{source}.css" unless source.include?(".") tag("link", "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => source) |