Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Revert "Merge pull request #4803 from lucascaton/master""

This reverts commit 6871bd9.
  • Loading branch information...
commit 389397952460d09218bb407be1142e0b62cf3f4f 1 parent c60be72
@spastorino spastorino authored
View
2  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*
View
4 actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -152,7 +152,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
# * <tt>:type</tt> - Override the auto-generated mime type, defaults to 'image/vnd.microsoft.icon'
#
# favicon_link_tag '/myicon.ico'
- # # => <link href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
+ # # => <link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
#
# Mobile Safari looks for a different <link> 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'
# # => <link href="/assets/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',
View
2  actionpack/test/template/asset_tag_helper_test.rb
@@ -200,7 +200,7 @@ def url_for(*args)
}
FaviconLinkToTag = {
- %(favicon_link_tag) => %(<link href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />),
+ %(favicon_link_tag) => %(<link href="/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag 'favicon.ico') => %(<link href="/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag 'favicon.ico', :rel => 'foo') => %(<link href="/images/favicon.ico" rel="foo" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag 'favicon.ico', :rel => 'foo', :type => 'bar') => %(<link href="/images/favicon.ico" rel="foo" type="bar" />),

1 comment on commit 3893979

@guilleiguaran

@spastorino why this was re-reverted? :smile:

Please sign in to comment.
Something went wrong with that request. Please try again.