diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 94eb876db57c5..bf3c81740f50c 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -996,6 +996,8 @@ not submitted with the form. 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* + * `ActionView::Helpers::TextHelper#highlight` now defaults to the HTML5 `mark` element. *Brian Cardarella* diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index bf78c00e4d1bf..31e37893c6eb3 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -152,7 +152,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) # * :type - Override the auto-generated mime type, defaults to 'image/vnd.microsoft.icon' # # favicon_link_tag '/myicon.ico' - # # => + # # => # # Mobile Safari looks for a different tag, pointing to an image that # will be used if you add the page to the home screen of an iPod Touch, iPhone, or iPad. @@ -161,7 +161,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 185f742c7ff2e..11614a45dc513 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -200,7 +200,7 @@ def url_for(*args) } 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') => %(),