1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #4803 from lucascaton/master

Remove slash from favicon_link_tag method attribute
This commit is contained in:
Aaron Patterson 2012-01-31 10:17:17 -08:00
commit bb842e8d21
3 changed files with 5 additions and 3 deletions

View file

@ -26,6 +26,8 @@
This is a behavior change, previously the hidden tag had a value of the disabled checkbox. This is a behavior change, previously the hidden tag had a value of the disabled checkbox.
*Tadas Tamosauskas* *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) ## ## Rails 3.2.0 (January 20, 2012) ##
* Add `config.action_dispatch.default_charset` to configure default charset for ActionDispatch::Response. *Carlos Antonio da Silva* * Add `config.action_dispatch.default_charset` to configure default charset for ActionDispatch::Response. *Carlos Antonio da Silva*

View file

@ -234,7 +234,7 @@ module ActionView
# #
# generates # generates
# #
# <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" />
# #
# You may specify a different file in the first argument: # You may specify a different file in the first argument:
# #
@ -252,7 +252,7 @@ module ActionView
# #
# <%= favicon_link_tag 'mb-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %> # <%= 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', { tag('link', {
:rel => 'shortcut icon', :rel => 'shortcut icon',
:type => 'image/vnd.microsoft.icon', :type => 'image/vnd.microsoft.icon',

View file

@ -168,7 +168,7 @@ class AssetTagHelperTest < ActionView::TestCase
} }
FaviconLinkToTag = { 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') => %(<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') => %(<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" />), %(favicon_link_tag 'favicon.ico', :rel => 'foo', :type => 'bar') => %(<link href="/images/favicon.ico" rel="foo" type="bar" />),