Skip to content

Commit

Permalink
Revert "Merge pull request #4803 from lucascaton/master"
Browse files Browse the repository at this point in the history
This reverts commit bb842e8, reversing
changes made to 40c287c.
This was causing issues in one of our apps we just upgraded.
ActionController::RoutingError: No route matches [GET]
"/images/favicon.ico"
favicon_link_tag now returns '/images/favicon.ico' and in 3.2 returned
'/favicon.ico'
Browsers by default look for favicon.ico in the root directory

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_view/helpers/asset_tag_helper.rb
  • Loading branch information
spastorino committed Feb 20, 2013
1 parent d3563bd commit 6871bd9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions actionpack/CHANGELOG.md
Expand Up @@ -1019,8 +1019,6 @@
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*

Expand Down
4 changes: 2 additions & 2 deletions actionpack/lib/action_view/helpers/asset_tag_helper.rb
Expand Up @@ -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="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
# # => <link href="/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.
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion actionpack/test/template/asset_tag_helper_test.rb
Expand Up @@ -200,7 +200,7 @@ def url_for(*args)
}

FaviconLinkToTag = {
%(favicon_link_tag) => %(<link href="/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag) => %(<link href="/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" />),
Expand Down

1 comment on commit 6871bd9

@guilleiguaran
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!!

Please sign in to comment.