From a5976ccc371382ad7fb9645252c19c4e437d353c Mon Sep 17 00:00:00 2001 From: Lucas Caton Date: Tue, 31 Jan 2012 15:46:02 -0200 Subject: [PATCH] Remove slash from favicon_link_tag method attribute --- actionpack/CHANGELOG.md | 2 ++ actionpack/lib/action_view/helpers/asset_tag_helper.rb | 4 ++-- actionpack/test/template/asset_tag_helper_test.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 1ffb7f32a0..0dafef90ae 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -26,6 +26,8 @@ This is a behavior change, previously the hidden tag had a value of the disabled checkbox. *Tadas Tamosauskas* +* `favicon_link_tag` helper will now use the favicon in app/assets by default. *Lucas Caton* + ## Rails 3.2.0 (January 20, 2012) ## * Add `config.action_dispatch.default_charset` to configure default charset for ActionDispatch::Response. *Carlos Antonio da Silva* diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 280e51549e..40a950c644 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -234,7 +234,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) # # generates # - # + # # # You may specify a different file in the first argument: # @@ -252,7 +252,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) # # <%= favicon_link_tag 'mb-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %> # - def favicon_link_tag(source='/favicon.ico', options={}) + def favicon_link_tag(source='favicon.ico', options={}) tag('link', { :rel => 'shortcut icon', :type => 'image/vnd.microsoft.icon', diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 3422a5efbd..90c2ca7a3d 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -168,7 +168,7 @@ def teardown } FaviconLinkToTag = { - %(favicon_link_tag) => %(), + %(favicon_link_tag) => %(), %(favicon_link_tag 'favicon.ico') => %(), %(favicon_link_tag 'favicon.ico', :rel => 'foo') => %(), %(favicon_link_tag 'favicon.ico', :rel => 'foo', :type => 'bar') => %(), -- GitLab